Lucene - Core
  1. Lucene - Core
  2. LUCENE-1299

Spell Checker suggestSimilar throws NPE when IndexReader is not null and field is null

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: modules/spellchecker
    • Labels:
      None

      Description

      The SpellChecker.suggestSimilar(String word, int numSug, IndexReader ir, String field, boolean morePopular) throws a NullPointerException when the IndexReader is not null, but the Field is. The Javadocs say that it is fine to have the field be null, but doesn't comment on the fact that the IndexReader also needs to be null in that case.

      1. LUCENE-1299.patch
        2 kB
        Grant Ingersoll

        Activity

        Hide
        Grant Ingersoll added a comment -

        Patch to properly handle null field

        Show
        Grant Ingersoll added a comment - Patch to properly handle null field
        Hide
        Grant Ingersoll added a comment -

        Committed revision 663649.

        Show
        Grant Ingersoll added a comment - Committed revision 663649.

          People

          • Assignee:
            Grant Ingersoll
            Reporter:
            Grant Ingersoll
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development