You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Andy Coulson <an...@epicor.com> on 2021/09/20 22:02:24 UTC

Help with suggester matching multiple fuzzy terms

I could use some advice on choosing and configuring the best analyzer lookup factory for suggestions.

In my use case, I have indexed a document field containing:
"clutch release bearing"

I would like all of the following to provide that as a matching suggestion:
"clutch release"
"release clutch"
"clutc release"
"clutc release"
"release clutch"
(and various other permutations where the word order varies and misspellings result in edit distances of 1 or so per term)

I get good results using the AnalyzingInfixLookupFactory in terms of word order (using the config below), but it doesn't appear to do any fuzzy token matching at all. The fuzzy lookup factory provides fuzzy token matching, but starts returning nothing as soon as I type beyond a single token.

I currently have this in my solrConfig.xm:

  <searchComponent name="suggest" class="solr.SuggestComponent">
    <lst name="suggester">
      <str name="name">mySuggester</str>
      <str name="lookupImpl">AnalyzingInfixLookupFactory</str>
      <str name="field">LiteralName</str>
      <str name="suggestAnalyzerFieldType">cobraTextField</str>a
    </lst>
  </searchComponent>
  <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
    <lst name="defaults">
      <str name="suggest">true</str>
      <str name="suggest.count">10</str>
      <str name="buildOnStartup">true</str>
    </lst>
    <arr name="components">
      <str>suggest</str>
    </arr>
  </requestHandler>


Andy Coulson
Principal Software Engineer
Epicor Software Corporation
www.epicor.com<http://www.epicor.com/>
Tel.: (512) 328-2300
Cell: (512) 517-2494
E-Mail: andy.coulson@epicor.com<ma...@epicor.com>
[cid:image001.jpg@01D7AE41.475E0410]