Currently, this module only supports retrieving the autocomplete suggestions from the search server, for which the server's backend plugin has to support this. This is a) an unnecessary restriction and b) known to lead to often unhelpful suggestions, since the servers usually don't know which keywords/phrases are actually searched by users – only, which of them will yield results.
Replacing this hard-coded mechanism with a plugin system would make this a lot more flexible and allow other modules to come up with their own ways of computing suggestions.
One possible idea, e.g., would be an integration with the Search API Stats module to suggest the most popular keywords.
Comments
Comment #1
drunken monkeyComment #2
drunken monkeyHere is a first draft of the patch. Works perfectly fine, though, as far as I can see.
Please test/review!
Comment #3
drunken monkeyCommitted.
Comment #5
drunken monkeyAs usual, a few minutes after committing and pushing this, I noticed this breaks handling of the "Submit button selector" configuration field. The attached patch should fix this (and also fix overwriting of the internally stored page ID for Search API Pages searches).
Comment #7
drunken monkeyCommitted the follow-up.