Solr
  1. Solr
  2. SOLR-3143

Supply a phrase-oriented QueryConverter for Suggesters

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: spellchecker
    • Labels:
      None

      Description

      The supplied QueryConverter makes sense for Spellcheckers:
      it tries to parse out the 'meat' of the query (using e.g. identifier rules),
      and analyzes each parsed 'word' with the configured analyzer (separate tokenstream).

      words[] = splitByIdentifierRules();
      for (each word) {
       tokenstream ts = analyzer.tokenStream(word)
       for (each analyzedWord from tokenstream) {
         tokens.add(analyzedWord)
       }
      }
      

      However, for Suggesters this is not really optimal, because in the general
      case they do not work one word at a time: they aren't really suggesting
      individual words but instead an entire 'query' that matches a prefix.

      so instead here, I think we just want a QueryConverter that creates a
      single string containing all the 'meat', and we pass the whole thing to
      the analyzer, then the suggester.

      The current workaround on the wiki to this problem, is to ask the user to write custom
      code (http://wiki.apache.org/solr/Suggester#Tips_and_tricks), I think thats not
      great since this phrase-based suggesting is really the primary use case for
      suggesters.

      1. SOLR-3143.patch
        19 kB
        Robert Muir

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Robert Muir
            Reporter:
            Robert Muir
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development