Closed (fixed)
Project:
SearchStax Studio – Site Search
Version:
1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 Sep 2021 at 00:30 UTC
Updated:
30 Oct 2025 at 08:29 UTC
Jump to comment: Most recent
Comments
Comment #2
drunken monkeyThis module already integrates with Search API Autocomplete, which is the main means of adding auto-suggest to Search API searches. When this module is installed, the user just needs to select “SearchStax” as the suggester for an autocomplete search and autocompletion will start using SearchStax’s Auto-Suggest under the hood.
See the “Add auto-suggest to your searches (optional)” section of the documentation.
Adding autocomplete capabilities directly to this module would just mean duplicating lots of code between the two modules or severly restricting usability.
Comment #5
pavlosdanSince the auto-suggest core field is wrapped in an if module exists:
it is not immediately apparent to the user that the SearchStax auto-suggest feature is supported. It's also not documented on the module's page. The only way for someone to see right now that this is supported is to delve into the issue queue or read the module's code.
Added a README file to document the feature.
Could we also consider whether wrapping the field is needed? Since it's not a required field would it cause any issues if it's present on the form but left empty?
Comment #6
drunken monkeyGood idea to add a
README.mdfile, thanks! I expanded it slightly and amended the code style.Also, you’re right, this might currently be not discoverable enough for people unfamiliar with the Search API ecosystem. In your MR, I’m now changing the settings form to always display the “Auto-suggest core” field but disable it if the Search API Autocomplete module is not installed (along with an explanation to install it).
What do you say, do these changes make sense to you?
Comment #7
pavlosdanChanges make sense to me! Also liking the idea of having the field present on the form with a prompt to install search_api_autocomplete for it to become active rather than having it completely hidden :)
Thanks for addressing the coding standards issue. Sorry about that!
Looks good to me. Setting it to reviewed and tested.
Another question I had was whether this setting (and maybe others?) would be better served as part of the search_api server and search_api_autocomplete settings. As it stands, this configures SearchStax globally with one auto suggest core but a Drupal site may have multiple connect SearchStax cores (especially if multi-tenant) so we'd need to be able to point each SearchStax server's autocomplete settings to the appropriate emsuggest core. What do you think about having another issue to explore moving some settings to the search_api and search_api_autocomplete configuration entities?
Comment #8
john.oltman commentedI created https://www.drupal.org/project/searchstax/issues/3551333 and plan to work on that over the next few weeks unless someone beats me to it.
Comment #9
drunken monkeyGreat, thanks again!
Merged.
I’ll look at the other issue soon, too.