Hi all! I just startet evaluating Solr a few days ago and I'm quite happy with the way it works. The test project I am using on is a product search for a wine shop with 2500 articles and about 20 fields, with faceted search.
Now I'd like to know what would be the best way to implement a search term autocompletion in the way of Google Suggest (http://www.google.com/webhp?complete=1&hl=en). Most autocomplete implementations aim to display search result entries during input. What Suggest does, and what I'd like to accomplish, is an automatic suggestion of relevant index terms. This would help users to prevent spelling problems, which are a huge issue in the domain of wine, where almost every other term is french. Szenario: 1) The user types "sa" into a query input field. 2) The system searches for the 10 most frequent index terms starting with "sa" and displays the result in a menu. 3) The user adds a 3rd character => input is now "sau" 4) The system searches for the 10 most frequent index terms starting with "sa" and displays the result in a menu. 5) The user clicks on "sauvignon" in the menu and the term in the input field is completed to "sauvignon". So, what I need technically is the (web service) query that delivers all index terms (for specific index fields) starting with a certain prefix. The result should be ordered by frequency and limited to a certain amount of entries. Is this functionality already available in the Solr core? It seems as if "Schema Browser" functionality of the luke webapp (part of the nightly build) does something similar, but I can't find out how to limit the term lists to match the requirements above. I have to mention that I'm not an experienced Java developer. :) Thanks for your help! Marian