This thread might help - http://www.lucidimagination.com/search/document/9edc01a90a195336/enhancing_auto_complete
Cheers Avlesh @avlesh <http://twitter.com/avlesh> | http://webklipper.com On Tue, Aug 17, 2010 at 8:30 PM, Paul <p...@nines.org> wrote: > I have a couple questions about implementing an autocomplete function > in solr. Here's my scenario: > > I have a name field that usually contains two or three names. For > instance, let's suppose it contains: > > John Alfred Smith > Alfred Johnson > John Quincy Adams > Fred Jones > > I'd like to have the autocomplete be case insensitive and match any of > the names, preferably just at the beginning. > > In other words, if the user types "alf", I want > > John Alfred Smith > Alfred Johnson > > if the user types "fre", I want > > Fred Jones > > but not: > John Alfred Smith > Alfred Johnson > > I can get the matches using the text_lu analyzer, but the hints that > are returned are lower case, and only one name. > > If I use the "string" analyzer, I get the entire name like I want it, > but the user must match the case, that is, must type "Alf", and it > only matches the first name, not the middle name. > > How can I get the matches of the "text_lu" analyzer, but get the hints > like the "string" analyzer? > > Thanks, > Paul >