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

Remove deprecated Token class from solr.spelling package

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.8.1
    • Fix Version/s: None
    • Component/s: spellchecker
    • Labels:

      Description

      The deprecated Token class is used everywhere in the spelling package. I am attaching a patch that refactors/replaces all occurrences with the AttributeSource class. The tests are passing.

      Note: the AttributeSource class also replaces Token as a hash key in many places. Having stricter equals/hashCode requirements than Token, I am a bit concerned that it could produce some duplicate suggestions, especially in the case of ConjunctionSolrSpellChecker where merging of the different spell checking suggestions takes place. If this initial approach is fine, I can create some extra checks/unit tests for this.

        Attachments

        1. SOLR-6131.patch
          79 kB
          Spyros Kapnissis
        2. NukeToken.patch
          8 kB
          Ahmet Arslan

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              spyk Spyros Kapnissis
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: