I'm trying to implement the Sitecore SXA auto suggest search functionality, below is the setup
<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">sxaSuggester</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">sxacontent_txm</str>
<str name="suggestAnalyzerFieldType">text_suggester</str>
<str name="buildOnStartup">true</str>
</lst>
</searchComponent>
<requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy" >
<lst name="defaults">
<str name="suggest.dictionary">sxaSuggester</str>
<str name="suggest">true</str>
<str name="suggest.count">10</str>
</lst>
<arr name="components">
<str>suggest</str>
</arr>
</requestHandler>
My Sitecore instance is throwing the below error.
Error:
"Message": "An error has occurred.", "ExceptionMessage":"The given key was not present in the
dictionary.","ExceptionType":"System.Collections.Generic.KeyNotFoundException","StackTrace":"at
System.ThrowHelper.ThrowKeyNotFoundException()\r\n at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n at
Sitecore.XA.Foundation.Search.Providers.Solr.Services.SolrSuggester.GetSuggestions(SuggesterModel model, Timer&
queryTimer, String& indexName)\r\n at
Sitecore.XA.Feature.Search.Controllers.SearchController.SearchSuggestions(SuggesterModel model)\r\n at
lambda_method(Closure, Object, Object[])\r\n at
System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__3(Object
instance, Object[] methodParameters)\r\n at
System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext,
IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location
where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at
System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n--- End of
stack trace from previous location where exception was thrown ---\r\n at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at
System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack
trace from previous location where exception was thrown ---\r\n at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at
System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of
stack trace from previous location where exception was thrown ---\r\n at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at
System.Runtime.CompilerServices.TaskAwaiter.
Sitecore : 9.2 Solr : 7.5
Please let me know if I'm missing something here.
lookupImpl
parameter in suggester parameters -<str name="lookupImpl"> FSTLookupFactory</str>