lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <>
Subject Re: keywords, terms component for suggestion of sentences.
Date Mon, 10 May 2010 14:18:53 GMT

> Hello.
> I have a little problem. 
> i want to import an keywords-field from my database wich
> looks like this:
> Car, Radio, Car Radio, ...
> i import this with my DIH and i analyze with the
> PatternTokenizerFactory.
> <tokenizer class="solr.PatternTokenizerFactory"
> pattern=", *" />
> suggestion for one word works fine, but not forĀ  e.g.
> "Car Radio" when the
> user type in "Car R".
> ---
> when I use an edgeNGram... i can only suggest the complete
> row of keyword,
> but i want to suggest only the found word/words. not all of
> this.
> what do you think is the best solution for this ?

If you add ShingleFilterFactory to you fieldType definition of tags field, you can obtain
multi-word (shingle) suggestions. E.g. 'Car Radio' for 'Car R'.

I don't know how data is stored in keywords-field column. One line comma separated values?
However you may need to change your tokenizer since 'Radio C' will return 'Radio Car' in this


View raw message