====== Autocomplete / Autosuggest ====== ===== Configuring Suggestions ===== Autocomplete functionality can be enabled, disabled or configured through settings in [[configuration:files:searches.ini]]. Each search type defined in your basic search type drop-down can be assigned its own custom [[development:plugins:autosuggesters|autocomplete handler]]. The currently available handlers and configuration details can be found in the comments above the [Autocomplete] and [Autocomplete_Types] sections of [[configuration:files:searches.ini]]. ===== Building Custom Suggestions ===== Autocomplete handlers are standard VuFind® [[development:plugins|plug-ins]]; more details can be found on the [[development:plugins:autosuggesters]] plugin page. ==== Ideas for New Handlers ==== The current default autocomplete handler uses a fairly simple Solr lookup. Here are some more sophisticated approaches which may be worth pursuing: * The [[https://solr.apache.org/guide/solr/latest/query-guide/terms-component.html|TermsComponent]] may be an appropriate Solr search handler to get suggestions from. But left hand truncation is still not possible with that. * The [[https://lucidworks.com/post/auto-suggest-from-popular-queries-using-edgengrams/|Using Solr NGrams to Implement Auto-Suggest in Search]] article outlines using EdgeNGrams to set up autocomplete against popular queries parsed from the Solr logs. * A more modern approach worth investigating would be to use Solr's native [[https://solr.apache.org/guide/solr/latest/query-guide/suggester.html|Suggester component]], which did not yet exist when VuFind®'s autocomplete logic was originally implemented.