lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mirko <idonthaveenoughinformat...@googlemail.com>
Subject Re: Suggester - how to return exact match?
Date Mon, 25 Nov 2013 13:53:15 GMT
Thanks! We solved this issue in the front-end now. I.e. we add the exact
match to the list of suggestions there.

Mirko


2013/11/22 Developer <bbarani@gmail.com>

> Might not be a perfect solution but you can use edgengram filter and copy
> all
> your field data to that field and use it for suggestion.
>
> <fieldType name="text_autocomplete" class="solr.TextField"
> positionIncrementGap="100">
>   <analyzer type="index">
>     <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>     <filter class="solr.LowerCaseFilterFactory"/>
>     <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"
> maxGramSize="250" />
>   </analyzer>
>   <analyzer type="query">
>     <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>     <filter class="solr.LowerCaseFilterFactory"/>
>   </analyzer>
> </fieldType>
>
> http://localhost:8983/solr/core1/select?q=name:iphone
>
> The above query will return
> iphone
> iphone5c
> iphone4g
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Suggester-how-to-return-exact-match-tp4102203p4102521.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

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