Skip to main content

Posts

Showing posts from April, 2021

Sitecore Solr Auto Suggester on Multiple Field

Sitecore Solr Auto Suggester on Multiple Field  In the last blog , we have created Solr auto suggester functionality on a single field. Now in this blog, we are going to discuss how we can display results in suggest component on basis of multiple fields value, suppose you have one field Title and another is a Tag and now when user search any word it will search result on both Title and Tag fields. To do this, add multiple dictionaries like below for contentSuggester and tagSuggester field. <searchComponent name="suggest" class="solr.SuggestComponent"> <lst name="suggester"> <str name="name">contentSuggester</str> <str name="lookupImpl">AnalyzingInfixLookupFactory</str> <str name="dictionaryImpl">DocumentDictionaryFactory</str> <str name="field">title_t</str> <str name="contextField">_template</str>

Solr Auto Suggester With Sitecore

Solr Auto Suggester With Sitecore What is a Solr Suggester? The Solr suggester component provides automatic suggestions to users, just like Google provides suggestions. Solr has a suggester component which is called SuggestComponent. More detail is available here Configuration the SuggesterComponent Navigate to this location “SolrFolder\server\solr\configsets\INDEXNAME \conf” and open “solrconfig.xml”. Search below comment in “solrconfig.xml” file. <!-- SearchHandler http://wiki.apache.org/solr/SearchHandler For processing Search Queries, the primary Request Handler provided with Solr is "SearchHandler" It delegates to a sequent of SearchComponents (see below) and supports distributed queries across multiple shards --> and paste the below code: <searchComponent name="suggest" class="solr.SuggestComponent"> <lst name="suggester"> <str name="name">contentSu