- Issue created by @vsujeetkumar
- 🇮🇳India kalpanajaiswal
I've been working on replicating this locally, and I believe it's functioning as expected after addressing other issues in the queue.
After looking into the issue " https://www.drupal.org/project/search_api_autocomplete/issues/3024266 ✨ Avoid multiple results for the same keyword Needs work "
The goal is to eliminate duplicate suggestions.The specific question I have is regarding keywords that appear in both lowercase and uppercase.
For example, if we have "Backup" and "BACKUP," should the suggestions include both "backup" and "BACKUP," or just "backup"?
This needs to be aligned with the fix for issue 3024266.I couldn't find a specific option to enable case-sensitive suggestions. However, if we want the suggestions to be case-sensitive, then the results should also be case-sensitive.
- Status changed to Fixed
5 months ago 8:22am 16 June 2024 - 🇦🇹Austria drunken monkey Vienna, Austria
This is expected behavior, and based on your problem description you might also have configured Autocomplete incorrectly. As you’re referring to “Solr results”, it seems like you might want to get results as suggestions, not keywords? In this case, please choose the “Live results” suggester instead of “Retrieve from server”.
The “Retrieve from server” suggester uses the backend plugin (the Solr backend plugin, in your case) to retrieve matching words from the search index to suggest words that the user might currently be typing – so, a “proper” autocomplete. Anyways, by this description, you see that this will only ever yield words as suggestions that are present in the Solr index. Since your fulltext fields are pretty certainly configured to ignore case, the Solr index will only have lowercase words indexed, so those are what will be suggested by Autocomplete.
If you want autocomplete to perserve the case, you will need to use a separate fulltext field that preserves the case during indexing, use that just for Autocomplete and the other fulltext field(s) for actual searching.In any case, the behavior of the “Retrieve from server” suggester depends entirely on the backend, so I’m moving this issue to the Solr issue queue accordingly.
@kalpanajaiswal: Thanks for the help!
Automatically closed - issue fixed for 2 weeks with no activity.