I am trying to Solr auto suggest query from multiple fields (say for example, name_t, description_t) in a single request handler or same suggest.dictionary.

I have the configs as below, when I have multiple "field" under the same suggester, it's not working. Also, when I try with the same name that's also not working.

<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">NameSuggester</str>
<str name="lookupImpl">FSTLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">name_t</str>    
<str name="suggestAnalyzerFieldType">string</str>
<lst name="suggester">
<str name="name">DescriptionSuggester</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="lookupImpl">FSTLookupFactory</str>   
<str name="field">description_t</str>            
<str name="suggestAnalyzerFieldType">string</str>

 <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">DescriptionSuggester</str>
 <arr name="components">

C# Code

 using (var ctx = ContentSearchManager.GetIndex("sitecore_master_index").CreateSearchContext())
            SolrSuggestQuery q = "Description";
            var options = new SuggestHandlerQueryOptions
                Parameters = new SuggestParameters
                    Count = 10,
                    Build = true

            var result = ctx.Suggest(q, options);
            var resultnew = result.Suggestions["DescriptionSuggester"].Suggestions.Select(a => a.Term);

2 Answers 2


It looks like related to configuration only. You can try changing your configuration a bit like use AnalyzingInfixLookupFactory in lookupImpl and also removes dictionaryImpl.

<searchComponent name="suggest" class="solr.SuggestComponent">
     <lst name="suggester">
       <str name="name">mySuggester</str>
       <str name="lookupImpl">AnalyzingInfixLookupFactory</str>
       <str name="field">autocomplete__txtsug</str>
       <str name="suggestAnalyzerFieldType">string</str>
       <str name="buildOnStartup">true</str>

Also, Add the new field in Managed-Schema file.

<fieldType class="solr.TextField" name="textSuggest" positionIncrementGap="100">
      <tokenizer class="solr.StandardTokenizerFactory"/>
      <filter class="solr.LowerCaseFilterFactory"/>

Refer to this for step-by-step details: Enabling the Suggester from SOLR for the Search box


Use copyfields to combine multiple fields into a single field and use that field as a suggester.


<copyField source="name" dest="mynewfield" />
<copyField source="other_name" dest="mynewfield" />


<str name="field">mynewfield</str>

Hope it helps!


Adding one more thing with the configuration you have already done with. You can try rebuilding your suggested like below.


Until you do this step, no suggestions are returned.

After completing this ask for suggestions like below.


The response will contain a suggest field. This field will contain fields for each of the suggest.dictionaries that was used. Each of these dictionary fields will have a "numFound" field as well as a "suggestions" field containing an array of the found suggestions.

Hope this will help.

  • Hi Sumit, Thanks, i was facing a config issue to copy more than one source field to one destination field. This works now. But the suggestion is suggesting based on the first or prefix of the value from the particular configured field. when i pass any word other than the first, it's not yielding any result.
    – Jey
    Commented Apr 17, 2023 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.