lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chantal Ackermann <>
Subject Re: TermsComponent - AutoComplete - Multiple Term Suggestions & Inclusive Search?
Date Wed, 23 Jun 2010 12:49:51 GMT
Hi Saïd,

I think your problem is the field's type: String. You have to use a
TextField and apply tokenizers that will find "subcategory" if you put
in "cat". (Not sure which filter does that, though. I wouldn't think
that the PorterStemmer cuts off prefix syllables of that kind?)

If, however, you search on an analyzed version of the field it should
return hits as usual according to the analyzer chain, and you can thus
use the values of that field listed in the hits as suggestions.

input: potter
field type: solr.TextField (with porter stemmer)
finds: "Harry Potter and Whatever"
and also "Potters and Plums"


On Wed, 2010-06-23 at 13:17 +0200, Saïd Radhouani wrote:
> Hi,
> I'm using the Terms Component to se up the autocomplete feature based on a String field.
Here are the params I'm using:
> terms=true&terms.fl=type&terms.lower=cat&terms.prefix=cat&terms.lower.incl=false
> With the above params, I've been able to get suggestions for terms that start with the
specified prefix. I'm wondering wether it's possible to:
> - have inclusive search, i.e., by typing "cat," we get "category," "subcategory," etc.?
> - start suggestion from any word in the field. i.e., by typing "cat," we get "The best
> Thanks!
>  -Saïd

View raw message