Lucene - Core
  1. Lucene - Core
  2. LUCENE-6775

Improve MorfologikFilterFactory to allow arbitrary dictionaries from ResourceLoader

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4, 6.0
    • Component/s: modules/analysis
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Followup issue for LUCENE-6774: The filter ctor already allows to pass any dictionary to the filter, but you have no chance to configure this through the Factory (CustomAnalyzer/Solr/Elasticsearch/...). This will add 2 parameters to the factory (exclusive with the dictionary string specifying language, default "pl"), to load FSA (dictionary) and corresponding property file (metadata/featureData). This dictionary could be placed, e.g. in Solr's conf dir and loaded, because this would be done via ResourceLoader.
      Alternatively the language could still be passed, but must be part of JAR file distribution. Currently this defaults to "pl" at the moment and plain Lucene does not allow more, unless you add own JAR files. So practically, the parameter is useless for a pure, uncustomized Lucene-Impl.

      1. LUCENE-6775.patch
        12 kB
        Uwe Schindler
      2. LUCENE-6775.patch
        11 kB
        Uwe Schindler
      3. LUCENE-6775.patch
        11 kB
        Uwe Schindler

        Issue Links

          Activity

          Hide
          Uwe Schindler added a comment -

          Factory + tests.

          Show
          Uwe Schindler added a comment - Factory + tests.
          Hide
          Uwe Schindler added a comment -

          Load the dictionary-resource up front in factory.

          Show
          Uwe Schindler added a comment - Load the dictionary-resource up front in factory.
          Hide
          Uwe Schindler added a comment -

          I removed the crazy XOR in the patch (on Dawid's suggestion). Code was hard to read. Now its more explicit what it does.

          Show
          Uwe Schindler added a comment - I removed the crazy XOR in the patch (on Dawid's suggestion). Code was hard to read. Now its more explicit what it does.
          Hide
          ASF subversion and git services added a comment -

          Commit 1702118 from Uwe Schindler in branch 'dev/trunk'
          [ https://svn.apache.org/r1702118 ]

          LUCENE-6775: Improved MorfologikFilterFactory to allow loading of custom dictionaries from ResourceLoader

          Show
          ASF subversion and git services added a comment - Commit 1702118 from Uwe Schindler in branch 'dev/trunk' [ https://svn.apache.org/r1702118 ] LUCENE-6775 : Improved MorfologikFilterFactory to allow loading of custom dictionaries from ResourceLoader
          Hide
          ASF subversion and git services added a comment -

          Commit 1702119 from Uwe Schindler in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1702119 ]

          Merged revision(s) 1702118 from lucene/dev/trunk:
          LUCENE-6775: Improved MorfologikFilterFactory to allow loading of custom dictionaries from ResourceLoader

          Show
          ASF subversion and git services added a comment - Commit 1702119 from Uwe Schindler in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1702119 ] Merged revision(s) 1702118 from lucene/dev/trunk: LUCENE-6775 : Improved MorfologikFilterFactory to allow loading of custom dictionaries from ResourceLoader

            People

            • Assignee:
              Uwe Schindler
              Reporter:
              Uwe Schindler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development