See below.

On Mon, Jan 24, 2011 at 1:51 PM, johnnyisrael <johnnyi.john...@gmail.com>wrote:

>
> Hi,
>
> I am trying out the auto suggest using EdgeNgram.
>
> Using the following tutorial as a reference.
>
>
> http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/
>
> In the above tutorial, The below two lines has been clearly mentioned,
>
> "Note that it’s necessary to wrap the query in double-quotes as a phrase.
> Otherwise unpredictable and unwanted matches can occur."
>
> When i use double quotes as they said it works perfectly fine. I just want
> to know the reason for this behavior.
>
> Can anyone explain me why it behaves like that?
>
>
The reason here is that if you *don't* make it a phrase, then
you're ORing (or ANDing) the grams. So if you were
searching for won, your search would become
w OR wo OR won, which would match n-grams from
all over the place without regard to whether they appeared
in order.


> I tried the alternate method mentioned in the responses section of the same
> tutorial [StandardTokenizerFactory and LowerCaseFilterFactory combination],
> it does not work fine as expected[bringing unwanted matches].
>
>
Hmmm, I don't think the StandartTokenizer & LowerCase was
being applied as autosuggest, there was a copyField in there
that went to the EdgeNGram (note that I scanned the article)..

Best
Erick



> Is there a best way to overcome this?
>
> Thanks,
>
> Johnny
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/EdgeNgram-Auto-suggest-doubles-ignore-tp2321919p2321919.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to