Skip to content

Instantly share code, notes, and snippets.

@EduardoSaverin
Created October 5, 2019 02:49
Show Gist options
  • Save EduardoSaverin/22f76114f1832fe7ce1f95d226a5132d to your computer and use it in GitHub Desktop.
Save EduardoSaverin/22f76114f1832fe7ce1f95d226a5132d to your computer and use it in GitHub Desktop.
SOLR Infix Suggestor
<config>
<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">mySuggester</str>
<str name="lookupImpl">AnalyzingInfixLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">headline</str>
<str name="suggestAnalyzerFieldType">text_en</str>
<str name="buildOnStartup">false</str>
</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="suggest.dictionary">mySuggester</str>
</lst>
<arr name="components">
<str>suggest</str>
</arr>
</requestHandler>
</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment