lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avlesh Singh <avl...@gmail.com>
Subject Re: autocomplete: case-insensitive and middle word
Date Tue, 17 Aug 2010 15:06:09 GMT
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 <paul@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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message