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

ConjunctionSolrSpellChecker wrong check for same string distance

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.9
    • 5.5
    • spellchecker
    • 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

        1. SOLR-6271.patch
          4 kB
          James Dyer
        2. SOLR-6271.patch
          4 kB
          Fabiano V. Santos

        Issue Links

          Activity

            People

              jdyer James Dyer
              elw00d Igor Kostromin
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: