I've been working on autocomplete functionality this week. It turned out to be easier to implement than expected, so I have just checked it into the trunk. Documentation is available here:
- Based on YUI (since that's the standard for VuFind), but with a back end designed to match jQuery standards for easy conversion in the future.
- Completely modular and configurable - you can set which classes handle requests related to which search handlers, and you can send configurable parameters to these classes.
- Default behavior based on Till's jQuery autocomplete branch.
- Global off switch in searches.ini if you don't want it.
My goal here was to create flexible autocomplete infrastructure and to offer basic autocomplete support for every search type in the default VuFind setup. I'm pretty satisfied that this has been achieved. However, there is definitely room for improvement in the area of suggestion generation. Using basic Solr searching to power suggestions is pretty good, but occasionally it produces odd results (mainly when multi-valued fields come into play). If anyone wants to implement handlers that provide suggestions in a more sophisticated way (see some of the ideas on the wiki page above), I would welcome contributions that make this even more powerful!
Let me know if you have questions or comments!
Get latest updates about Open Source Projects, Conferences and News.