Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6271

ConjunctionSolrSpellChecker wrong check for same string distance

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.9
    • Fix Version/s: 5.5
    • Component/s: spellchecker
    • Labels:
      None

      Description

      See ConjunctionSolrSpellChecker.java

      try {
      if (stringDistance == null)

      { stringDistance = checker.getStringDistance(); }

      else if (stringDistance != checker.getStringDistance())

      { throw new IllegalArgumentException( "All checkers need to use the same StringDistance."); }

      } catch (UnsupportedOperationException uoe)

      { // ignore }

      In line stringDistance != checker.getStringDistance() there is comparing by references. So if you are using 2 or more spellcheckers with same distance algorithm, exception will be thrown anyway.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              jdyer James Dyer
              Reporter:
              elw00d Igor Kostromin

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment