Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      See attached path which makes the spellchecker test case work again. The problem without the patch is that consecutive calls to indexDictionary() will create a spelling index with duplicate words. Does anybody see a problem with this patch? I see that the spellchecker code is now used in Solr, isn't it? I didn't have time to test this patch inside Solr.

      Also see http://issues.apache.org/jira/browse/LUCENE-632, but the null check is included in this patch so the NPE described there cannot happen anymore.

        Activity

        Hide
        lucenebugs@danielnaber.de Daniel Naber added a comment -

        patch to make test case work again

        Show
        lucenebugs@danielnaber.de Daniel Naber added a comment - patch to make test case work again
        Hide
        otis Otis Gospodnetic added a comment -

        Do you need reader=null?
        Do you need to close reader explicitly here? searcher.close() can close it, depending on which searcher ctor was used, if I recall correctly. Not sure which one is used in spellchecker, off the top of my head.

        Re Solr - yes, I added that to Solr in SOLR-81.

        Show
        otis Otis Gospodnetic added a comment - Do you need reader=null? Do you need to close reader explicitly here? searcher.close() can close it, depending on which searcher ctor was used, if I recall correctly. Not sure which one is used in spellchecker, off the top of my head. Re Solr - yes, I added that to Solr in SOLR-81 .
        Hide
        lucenebugs@danielnaber.de Daniel Naber added a comment -

        Yes, the exist() method checks whether the reader is null and re-opens it if necessary, so reader = null is needed.

        Show
        lucenebugs@danielnaber.de Daniel Naber added a comment - Yes, the exist() method checks whether the reader is null and re-opens it if necessary, so reader = null is needed.
        Hide
        lucenebugs@danielnaber.de Daniel Naber added a comment -

        Patch applied.

        Show
        lucenebugs@danielnaber.de Daniel Naber added a comment - Patch applied.

          People

          • Assignee:
            Unassigned
            Reporter:
            lucenebugs@danielnaber.de Daniel Naber
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development