How to configure multiple contextfields in single solr suggester?

Viewed 2421

I am using apache solr to search records in my current application.

And I was able to filter the suggesions based on DocumentType by configuring the context field.

Now I want to add another context field like departmentType. I am not sure how to configure the suggester for multiple context fields.

This is the suggester that used with single context fields and this is working fine.

 <searchComponent name="suggest" class="solr.SuggestComponent">
  <lst name="suggester">
     <str name="name">suggesterByName</str>
     <str name="lookupImpl">AnalyzingInfixLookupFactory</str>
     <str name="dictionaryImpl">DocumentDictionaryFactory</str>
     <str name="field">fullName</str>
     <str name="contextField">documentType</str>
        <str name="suggestAnalyzerFieldType">text_general</str>
     <str name="buildOnStartup">false</str>
   </lst>
 </searchComponent>

I refer this post https://issues.apache.org/jira/browse/SOLR-7888

but still not clear how to configure multiple context fields in a single suggester .

1 Answers
Related