Both sides previous revisionPrevious revisionNext revision | Previous revision |
configuration:autocomplete [2015/12/14 20:29] – ↷ Page moved from autocomplete to configuration:autocomplete demiankatz | configuration:autocomplete [2023/05/08 12:12] (current) – [Ideas for New Handlers] demiankatz |
---|
====== Autocomplete / Autosuggest ====== | ====== Autocomplete / Autosuggest ====== |
| |
// IMPORTANT: This page refers to features that were added in VuFind 1.1; if you are using an earlier release, please upgrade. // | |
| |
===== Configuring Suggestions ===== | ===== Configuring Suggestions ===== |
| |
Autocomplete functionality can be enabled, disabled or configured through settings in [[searches.ini]]. Each search type defined in your basic search type drop-down can be assigned its own custom autocomplete handler. The currently available handlers and configuration details can be found in the comments above the [Autocomplete] and [Autocomplete_Types] sections of [[searches.ini]]. | 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 ===== | ===== Building Custom Suggestions ===== |
| |
==== VuFind 1.x ==== | Autocomplete handlers are standard VuFind® [[development:plugins|plug-ins]]; more details can be found on the [[development:plugins:autosuggesters]] plugin page. |
| |
All of the autocomplete handlers can be found in the web/sys/Autocomplete folder of your VuFind installation. To create your own handler, simply implement the interface found in [[https://vufind.svn.sourceforge.net/svnroot/vufind/trunk/web/sys/Autocomplete/Interface.php|Interface.php]] in that folder. Ensure that the class name and filename match. You can then configure your custom handler just like any of the existing handlers, using the usual [[searches.ini]] settings described above. | |
| |
==== VuFind 2.x ==== | |
| |
Autocomplete handlers are standard VuFind 2.x plug-ins; more details can be found on the [[development:plugins:autosuggesters]] plugin page. | |
| |
==== Ideas for New Handlers ==== | ==== 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 current default autocomplete handler uses a fairly simple Solr lookup. Here are some more sophisticated approaches which may be worth pursuing: |
| |
The [[http://wiki.apache.org/solr/TermsComponent|TermsComponent]] that is new in Solr 1.4 may be an appropriate Solr search handler to get suggestions from. But left hand truncation is still not possible with that. | * 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. |
On [[http://www.mattweber.org/2009/05/02/solr-autosuggest-with-termscomponent-and-jquery/]] Matt Weber basically describes one way to set up autocomplete fields using TermComponent and JQuery. | * 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. |
| |
On [[http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/]] Jay Hill outlines using EdgeNGrams to set up autocomplete against popular queries parsed from the Solr logs. | |
---- struct data ---- | ---- struct data ---- |
| properties.Page Owner : |
---- | ---- |
| |