You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Kusenda, Brandyn J" <br...@uiowa.edu> on 2011/05/05 15:22:03 UTC
fast case-insensitive autocomplete
Hi.
I need an autocomplete solution to handle case-insensitive queries but
return the original text with the case still intact. I've experimented
with both the Suggester and TermComponent methods. TermComponent is working
when I use the regex option, however, it is far to slow. I get the speed i
want by using term.prefix for by using the suggester but it's case
sensitive.
Here is an example operating on a user directory:
Query: bran
Results: Branden Smith, Brandon Thompson, Brandon Verner, Brandy Finny, Brian Smith, ...
A solution that I would expect to work would be to store two fields; one
containing the original text and the other containing the lowercase. Then
convert the query to lower case and run the query against the lower case
field and return the original (case preserved) field.
Unfortunately, I can't get a TermComponent query to return additional
fields. It only returns the field it's searching against. Should this work
or can I only return additional fields for standard queries.
Thanks in advance,
Brandyn
Re: fast case-insensitive autocomplete
Posted by William Bell <bi...@gmail.com>.
Are you giving that solution away? What is the costs? etc!!
On Thu, May 5, 2011 at 2:58 PM, Otis Gospodnetic
<ot...@yahoo.com> wrote:
> Hi,
>
> I haven't used Suggester yet, but couldn't you feed it all lowercase content and
> then lowercase whatever the user is typing before sending it to Suggester to
> avoid case mismatch?
>
> Autocomplete on http://search-lucene.com/ uses
> http://sematext.com/products/autocomplete/index.html if you want a shortcut.
>
> Otis
> ----
> Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
> Lucene ecosystem search :: http://search-lucene.com/
>
>
>
> ----- Original Message ----
>> From: "Kusenda, Brandyn J" <br...@uiowa.edu>
>> To: "solr-user@lucene.apache.org" <so...@lucene.apache.org>
>> Sent: Thu, May 5, 2011 9:22:03 AM
>> Subject: fast case-insensitive autocomplete
>>
>> Hi.
>> I need an autocomplete solution to handle case-insensitive queries but
>> return the original text with the case still intact. I've experimented
>> with both the Suggester and TermComponent methods. TermComponent is working
>> when I use the regex option, however, it is far to slow. I get the speed i
>> want by using term.prefix for by using the suggester but it's case
>> sensitive.
>>
>> Here is an example operating on a user directory:
>>
>> Query: bran
>> Results: Branden Smith, Brandon Thompson, Brandon Verner, Brandy Finny, Brian
>>Smith, ...
>>
>> A solution that I would expect to work would be to store two fields; one
>> containing the original text and the other containing the lowercase. Then
>> convert the query to lower case and run the query against the lower case
>> field and return the original (case preserved) field.
>> Unfortunately, I can't get a TermComponent query to return additional
>> fields. It only returns the field it's searching against. Should this work
>> or can I only return additional fields for standard queries.
>>
>> Thanks in advance,
>> Brandyn
>>
>
Re: fast case-insensitive autocomplete
Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hi,
I haven't used Suggester yet, but couldn't you feed it all lowercase content and
then lowercase whatever the user is typing before sending it to Suggester to
avoid case mismatch?
Autocomplete on http://search-lucene.com/ uses
http://sematext.com/products/autocomplete/index.html if you want a shortcut.
Otis
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/
----- Original Message ----
> From: "Kusenda, Brandyn J" <br...@uiowa.edu>
> To: "solr-user@lucene.apache.org" <so...@lucene.apache.org>
> Sent: Thu, May 5, 2011 9:22:03 AM
> Subject: fast case-insensitive autocomplete
>
> Hi.
> I need an autocomplete solution to handle case-insensitive queries but
> return the original text with the case still intact. I've experimented
> with both the Suggester and TermComponent methods. TermComponent is working
> when I use the regex option, however, it is far to slow. I get the speed i
> want by using term.prefix for by using the suggester but it's case
> sensitive.
>
> Here is an example operating on a user directory:
>
> Query: bran
> Results: Branden Smith, Brandon Thompson, Brandon Verner, Brandy Finny, Brian
>Smith, ...
>
> A solution that I would expect to work would be to store two fields; one
> containing the original text and the other containing the lowercase. Then
> convert the query to lower case and run the query against the lower case
> field and return the original (case preserved) field.
> Unfortunately, I can't get a TermComponent query to return additional
> fields. It only returns the field it's searching against. Should this work
> or can I only return additional fields for standard queries.
>
> Thanks in advance,
> Brandyn
>
Re: fast case-insensitive autocomplete
Posted by Jan Høydahl <ja...@cominvent.com>.
Hi,
Try this solution using a Solr core: http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/
--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
On 5. mai 2011, at 15.22, Kusenda, Brandyn J wrote:
> Hi.
> I need an autocomplete solution to handle case-insensitive queries but
> return the original text with the case still intact. I've experimented
> with both the Suggester and TermComponent methods. TermComponent is working
> when I use the regex option, however, it is far to slow. I get the speed i
> want by using term.prefix for by using the suggester but it's case
> sensitive.
>
> Here is an example operating on a user directory:
>
> Query: bran
> Results: Branden Smith, Brandon Thompson, Brandon Verner, Brandy Finny, Brian Smith, ...
>
> A solution that I would expect to work would be to store two fields; one
> containing the original text and the other containing the lowercase. Then
> convert the query to lower case and run the query against the lower case
> field and return the original (case preserved) field.
> Unfortunately, I can't get a TermComponent query to return additional
> fields. It only returns the field it's searching against. Should this work
> or can I only return additional fields for standard queries.
>
> Thanks in advance,
> Brandyn