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 Gurfan <ht...@gmail.com> on 2014/05/29 10:54:15 UTC

search using Ngram.

Hi All,

We are using EdgeNGramFilterFactory for searching with minGramSize="3", as
per Business logic, auto fill suggestions should appear on entering 3
characters in search filter. While searching for contact with name "Bill
Moor",  the  value will does not get listed when we type 'Bill M' but when
we type 'Bill Moo' or 'Bill' it suggests 'Bill Moor'.

Clearly, The tokens are not generated when there is space in between, we
cannot set set minGramSize="1" as that will generate many tokens and slow
the performance. Do we have a solution without using Ngram to generate
tokens on entering 3 characters?


Please suggest.

Thanks,
--Gurfan



--
View this message in context: http://lucene.472066.n3.nabble.com/search-using-Ngram-tp4138596.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: search using Ngram.

Posted by Michael Della Bitta <mi...@appinions.com>.
Sounds like you are tokenizing your string when you don't really want to.

Either you want all queries to only search against prefixes of the whole
value without tokenization, or you need to produce several copyFields with
different analysis applied and use dismax to let Solr know which should
rank higher.

Or, you could use the Suggester component or one of the other bolt-on
autocomplete components instead.

Maybe you should post your current field definition and let us know
specifically what you're trying to achieve?


Michael Della Bitta

Applications Developer

o: +1 646 532 3062

appinions inc.

“The Science of Influence Marketing”

18 East 41st Street

New York, NY 10017

t: @appinions <https://twitter.com/Appinions> | g+:
plus.google.com/appinions
<https://plus.google.com/u/0/b/112002776285509593336/112002776285509593336/posts>
w: appinions.com <http://www.appinions.com/>


On Thu, May 29, 2014 at 4:54 AM, Gurfan <ht...@gmail.com> wrote:

> Hi All,
>
> We are using EdgeNGramFilterFactory for searching with minGramSize="3", as
> per Business logic, auto fill suggestions should appear on entering 3
> characters in search filter. While searching for contact with name "Bill
> Moor",  the  value will does not get listed when we type 'Bill M' but when
> we type 'Bill Moo' or 'Bill' it suggests 'Bill Moor'.
>
> Clearly, The tokens are not generated when there is space in between, we
> cannot set set minGramSize="1" as that will generate many tokens and slow
> the performance. Do we have a solution without using Ngram to generate
> tokens on entering 3 characters?
>
>
> Please suggest.
>
> Thanks,
> --Gurfan
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/search-using-Ngram-tp4138596.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>