Lucene - Core
  1. Lucene - Core
  2. LUCENE-852

spellchecker: make hard-coded values configurable

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: modules/other
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      the class org.apache.lucene.search.spell.SpellChecker uses the following hard-coded values in its method
      indexDictionary:
      writer.setMergeFactor(300);
      writer.setMaxBufferedDocs(150);
      this poses problems when the spellcheck index is created on systems with certain limits, i.e. in unix
      environments where the ulimit settings are restricted for the user (http://www.gossamer-threads.com/lists/lucene/java-dev/47428#47428).

      there are several ways to circumvent this:
      1. add another indexDictionary method with additional parameters:
      public void indexDictionary (Dictionary dict, int mergeFactor, int maxBufferedDocs) throws IOException

      2. add setter methods for mergeFactor and maxBufferedDocs
      (see code in http://www.gossamer-threads.com/lists/lucene/java-dev/47428#47428 )

      3. Make SpellChecker subclassing easier as suggested by Chris Hostetter
      (see reply http://www.gossamer-threads.com/lists/lucene/java-dev/47463#47463)

      thanx,
      karin

      1. LUCENE-852.patch
        2 kB
        Otis Gospodnetic
      2. LUCENE-852.patch
        2 kB
        Otis Gospodnetic

        Activity

        karin created issue -
        karin made changes -
        Field Original Value New Value
        Lucene Fields [Patch Available, New] [New, Patch Available]
        Description the class org.apache.lucene.search.spell.SpellChecker uses the following hard-coded values in its method
        indexDictionary:
                writer.setMergeFactor(300);
                writer.setMaxBufferedDocs(150);
        this poses problems when the spellcheck index is created on systems with certain limits, i.e. in unix
        environment where the ulimit setting are restricted for the user (http://www.gossamer-threads.com/lists/lucene/java-dev/47428#47428).

        there are several ways to circumvent this:
        1. add another indexDictionary method with additional parameters:
            public void indexDictionary (Dictionary dict, int mergeFactor, int maxBufferedDocs) throws IOException
            
        2. add setter methods for mergeFactor and maxBufferedDocs
            (see code in http://www.gossamer-threads.com/lists/lucene/java-dev/47428#47428 )

        3. Make SpellChecker subclassing easier as suggested by Chris Hostetter
           (see reply http://www.gossamer-threads.com/lists/lucene/java-dev/47463#47463)

        thanx,
        karin
        the class org.apache.lucene.search.spell.SpellChecker uses the following hard-coded values in its method
        indexDictionary:
                writer.setMergeFactor(300);
                writer.setMaxBufferedDocs(150);
        this poses problems when the spellcheck index is created on systems with certain limits, i.e. in unix
        environments where the ulimit settings are restricted for the user (http://www.gossamer-threads.com/lists/lucene/java-dev/47428#47428).

        there are several ways to circumvent this:
        1. add another indexDictionary method with additional parameters:
            public void indexDictionary (Dictionary dict, int mergeFactor, int maxBufferedDocs) throws IOException
            
        2. add setter methods for mergeFactor and maxBufferedDocs
            (see code in http://www.gossamer-threads.com/lists/lucene/java-dev/47428#47428 )

        3. Make SpellChecker subclassing easier as suggested by Chris Hostetter
           (see reply http://www.gossamer-threads.com/lists/lucene/java-dev/47463#47463)

        thanx,
        karin
        Otis Gospodnetic made changes -
        Assignee Otis Gospodnetic [ otis ]
        Component/s contrib/* [ 12312028 ]
        Lucene Fields [Patch Available, New] [New, Patch Available]
        Priority Major [ 3 ] Minor [ 4 ]
        Otis Gospodnetic made changes -
        Attachment LUCENE-852.patch [ 12382237 ]
        Otis Gospodnetic made changes -
        Attachment LUCENE-852.patch [ 12382536 ]
        Otis Gospodnetic made changes -
        Lucene Fields [Patch Available, New] [New, Patch Available]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12400628 ] Default workflow, editable Closed status [ 12562977 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12562977 ] jira [ 12583851 ]

          People

          • Assignee:
            Otis Gospodnetic
            Reporter:
            karin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development