Please be advised that, your Opensolr Index may fail to reload, when using AnalyzingInfixSuggester
It turns out, that Drupal, is exporting the Solr Configuration zip archive erroneously.
Basically, you will need to manually edit solrconfig_extra.xml, in order to explicitly specify a separate folder for each suggester dictionary.
You can click here to learn more, from the Bug reported to the Drupal Community.
What Is AnalyzingInfixSuggester?
AnalyzingInfixSuggester is a Solr suggester implementation that provides powerful autocomplete and type-ahead functionality. Unlike basic prefix suggesters, it can match on substrings within terms, so a query for "york" would match "New York." It builds an internal lookup data structure (a Lucene index) at startup or upon first use, which is what makes it both powerful and problematic in certain configurations.
Why Does It Fail on Index Reload?
The root cause is that AnalyzingInfixSuggester builds its lookup structure during core initialization. When you reload your Opensolr Index, the suggester tries to rebuild this lookup from data that may not yet be available or accessible. This is especially common when:
- The suggester dictionary does not have a dedicated storeDir configured, causing multiple suggesters to collide on the same directory.
- The Solr configuration was exported by Drupal's search_api_solr module, which may not include the necessary directory separation for each dictionary.
- The data directory is locked or incomplete during the reload cycle.
How to Fix It
Option 1: Add a Separate storeDir for Each Suggester Dictionary
Edit your solrconfig.xml (or solrconfig_extra.xml if using Drupal) and make sure each suggester dictionary has its own storeDir parameter:
<lst name="suggester">
<str name="name">mySuggester</str>
<str name="lookupImpl">AnalyzingInfixLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="storeDir">mySuggesterData</str>
<str name="field">suggest_field</str>
<str name="suggestAnalyzerFieldType">text_general</str>
</lst>
Option 2: Switch to BlendedInfixLookupFactory
BlendedInfixLookupFactory is a more robust alternative that also supports infix matching but handles the reload lifecycle better. Replace AnalyzingInfixLookupFactory with BlendedInfixLookupFactory in your configuration:
<lst name="suggester">
<str name="name">mySuggester</str>
<str name="lookupImpl">BlendedInfixLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">suggest_field</str>
<str name="suggestAnalyzerFieldType">text_general</str>
<str name="blenderType">position_linear</str>
</lst>
Option 3: Remove the Suggester Entirely
If you do not need autocomplete functionality, you can remove the suggester configuration from your solrconfig.xml entirely. Look for any <searchComponent name="suggest"> blocks and the associated <requestHandler name="/suggest"> and remove them.
After Making Changes
Once you have updated your configuration files in the Opensolr Config Files Editor, click Reload in your Opensolr Index control panel. If the reload succeeds without errors, the fix is working. Check the Error Log to confirm there are no remaining issues.