> 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'. 

http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ShingleFilterFactory

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 scenario.



Reply via email to