Quantcast

AnalyzingInfixSuggestor and PrefixQuery performance difference

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AnalyzingInfixSuggestor and PrefixQuery performance difference

krish mohan
hi,

When using AnalyzingInfixSuggestor, the suggest performance is faster than
the prefix query. How AnalyzingInfixSuggestor is faster than prefixQuery?
Is FST constructed in different way for AnalyzingInfixSuggestor? Or any
other reason?


Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AnalyzingInfixSuggestor and PrefixQuery performance difference

Michael McCandless-2
AnalyzingInfixSuggester does not use an FST; it uses a Lucene index.

It's faster because 1) it indexes leading ngrams (up to 4 characters by
default) so that short suggestions map to a TermQuery (longer suggestions
still use PrefixQuery), which is much faster than PrefixQuery, but also 2)
it uses impact sorted postings, sorting by suggest weight, so that it can
early terminate on pulling suggestions.

Mike McCandless

http://blog.mikemccandless.com

On Thu, Mar 9, 2017 at 2:26 AM, krish mohan <[hidden email]>
wrote:

> hi,
>
> When using AnalyzingInfixSuggestor, the suggest performance is faster than
> the prefix query. How AnalyzingInfixSuggestor is faster than prefixQuery?
> Is FST constructed in different way for AnalyzingInfixSuggestor? Or any
> other reason?
>
>
> Thanks.
>
Loading...