I configured a search box for a drupal site and am a bit confused on how to get a search working with partial matches and a sensible autocomplete.
Some basic details:
- Drupal: 9.3.9
- Modules: Search API, Search API Autocomplete, Search API Solr
- Solr: 8.11.1
The search searches through different fields from several types of content. At first I set the field types to "Fulltext". Then I noticed that only complete words are matched. So searching for "idea" would not find pages containing "ideas". That worked when I changed all field types to "Fulltext ngram". But: Now the autocomplete suggests all the partials as well. So entering "super" would suggest "superh", "superhe" and "superhero". That's not really useful for the site's visitors.
What I already tried: The autocomplete uses the suggester "Retrieve from server". I tried to enable the additional module "search_api_solr_autocomplete". That adds three more suggesters, "Solr Spellcheck", "Solr Suggester" and "Solr Terms". The spellcheck suggester did not yield any autocomplete suggestions. Neither did the Solr Suggester. Solr Terms does the same as "Retrieve from server", it suggests all intermediate steps between the search word and the finished term, letter for letter.
What I am looking for is a clue how to configure this so that the search matches tokens with partial searches, but that only complete tokens are used for the autocomplete feature. Maybe a configuration step is missing?