Which lookup should i use for implementing context Filtering in solr Suggestor component?
I am trying to use contextFiler in FuzzyLookupFactory and AnalyzingLookupFactory but it is throwing me the below error:
Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/categories: this suggester doesn't support contexts.
My suggestor:
<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">displaySuggester</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">autoComplete</str>
<str name="contextField">productCategory</str>
<str name="suggestAnalyzerFieldType">string</str>
<str name="buildOnStartup">false</str>
</lst>
</searchComponent>
The reference manual has the required settings:
It's important to note that this is the
Analyzing**Infix**LookupFactory
, and not theAnalyzingLookupFactory
.You're already using the
DocumentDictionaryFactory
, so switch to either theAnalyzingInfixLookupFactory
or theBlendedInfixLookupFactory
to make it work.