Autocomplete returns "suggester was not built" after adding more Suggester fields

Created on 16 April 2024, 10 months ago
Updated 22 April 2024, 10 months ago

Respect the submission guidelines above! Drupal.org issue forks cause additional work for the project maintainer!

Setup

  • Solr version: 8.11.2
  • Drupal Core version: 10.1.8
  • Search API version: 8.x-1.30
  • Search API Solr version: 4.2.12
  • Configured Solr Connector: Standard

Issue

I have used Solr Suggester for autocomplete and it worked. I decided to add more fields as Suggester fields, in particular "body" fields for both media and node entities, added them and rebuilt the index. The autocomplete stopped working, I am getting this error now:
"responseHeader":{
"status":500,
"QTime":1},
"error":{
"msg":"suggester was not built",
"trace":"java.lang.IllegalStateException: suggester was not built\r\n\tat org.apache.lucene.search.suggest.analyzing.AnalyzingInfixSuggester.lookup(AnalyzingInfixSuggester.java:556)\r\n\tat org.apache.solr.spelling.suggest.SolrSuggester.getSuggestions(SolrSuggester.java:251)\r\n\tat org.apache.solr.handler.component.SuggestComponent.process(SuggestComponent.java:266)\r\n\tat .....,
"code":500}}

I also noticed the following in solrconfig_extra.xml (had to put <-- to make it visible):

<--requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
<--lst name="defaults">
<--str name="suggest">true
<--str name="suggest.dictionary">und
<--str name="suggest.dictionary">10
<--/lst>
<--arr name="components">
<--str>suggest
<--/arr>
<--/requestHandler-->

I found that the issue with the second suggest.dictionary = 10 was reported a while ago, but it is still there with search_api_solr ver. 4.2.12
I believe it should be changed to suggest.count = 10, but it worked with that before I added Suggested fields.

πŸ› Bug report
Status

Postponed: needs info

Version

4.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States calmforce

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024