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

Different SpellcheckComponents should have their own suggestMode

    XMLWordPrintableJSON

    Details

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

      Description

      As of now, common spellcheck options are applied to all the SpellCheckComponents.
      This can create problem in the following case:-
      It may be the case that we want DirectSolrSpellChecker to ALWAYS_SUGGEST spellcheck suggestions.
      But we may want WordBreakSpellChecker to suggest only if the token is not in the index (for relevance or performance reasons) (SUGGEST_WHEN_NOT_IN_INDEX) .

      UPDATE : Recently, we also figured out that, for WordBreakSolrSpellChecker also, both - The WordBreak and WordJoin should also have different suggestModes.

      We faced this problem in our case, wherein, Most of the WordJoin cases are those where the words individually are valid tokens, but what the users are looking for is actually a combination (wordjoin) of the two tokens.
      For example:-
      gold mine sunglasses : Here, both gold and mine are valid tokens. But the actual product being looked for is goldmine sunglasses , where goldmine is a brand.
      In such cases, we should recommend didYouMean:goldmine sunglasses . But this wont be possible because we had set SUGGEST_WHEN_NOT_IN_INDEX for WordBreakSolrSpellChecker (of which, WordJoin is a part) .
      For this, we should have separate suggestModes for both `wordJoin` as well as `wordBreak`.

      Related changes have been done at Latest PR. : https://github.com/apache/lucene-solr/pull/218.

        Attachments

        1. SOLR-10263.v2.patch
          6 kB
          Abhishek Kumar Singh

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              asingh2411 Abhishek Kumar Singh
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: