We're using the Solr (8.11) suggester for an autosuggest feature in our application. The build takes about 2 days to finish and as a result the autosuggest is not available during this time.
I tried to create duplicate search component and requestHandler
to try to build on one while servicing requests on the other and then swap via the config API when the build is done, but then it returns no values on either request handlers. If I rebuild on that node, it works until I try to swap again and it stops working. Also noticed that calling the collections API reload also causes no results returned. Is there a way to prevent traffic from going to the node that is building since we have multiple replicas?
Below is my config:
<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">mySuggester</str>
<str name="indexPath">blendedInfixSuggesterIndexDir</str>
<str name="lookupImpl">BlendedInfixLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">suggest_field</str>
<str name="suggestAnalyzerFieldType">suggest_type</str>
<str name="contextField">original-format</str>
<str name="highlight">false</str>
<str name="buildOnCommit">false</str>
<str name="buildOnOptimize">false</str>
<str name="buildOnStartup">false</str>
</lst>
</searchComponent>
<searchComponent name="suggest_alt" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">mySuggester</str>
<str name="indexPath">blendedInfixSuggesterIndexDir_alt</str>
<str name="lookupImpl">BlendedInfixLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">suggest_field</str>
<str name="suggestAnalyzerFieldType">suggest_type</str>
<str name="contextField">original-format</str>
<str name="highlight">false</str>
<str name="buildOnCommit">false</str>
<str name="buildOnOptimize">false</str>
<str name="buildOnStartup">false</str>
</lst>
</searchComponent>
<requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
<lst name="defaults">
<str name="suggest">true</str>
<str name="suggest.count">10</str>
</lst>
<arr name="components">
<str>suggest</str>
</arr>
</requestHandler>
<requestHandler name="/suggest_alt" class="solr.SearchHandler" startup="lazy">
<lst name="defaults">
<str name="suggest">true</str>
<str name="suggest.count">10</str>
</lst>
<arr name="components">
<str>suggest_alt</str>
</arr>
</requestHandler>
Thanks in advance