Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up phrase suggester #5395

Closed
nik9000 opened this issue Mar 12, 2014 · 0 comments
Closed

Speed up phrase suggester #5395

nik9000 opened this issue Mar 12, 2014 · 0 comments

Comments

@nik9000
Copy link
Member

nik9000 commented Mar 12, 2014

The phrase suggester spends quite a bit of time looking up term frequencies. We can probably make it faster.

nik9000 added a commit to nik9000/elasticsearch that referenced this issue Mar 17, 2014
Two changes:
1.  In the StupidBackoffScorer only look for the trigram if there is a bigram.
2.  Cache the frequencies in WordScorer so we don't look them up again and
again and again.  This is implemented by wrapping the TermsEnum in a special
purpose wrapper that really only works in context of the WordScorer.

This provides a pretty substantial speedup when there are many candidates.

Closes elastic#5395
@s1monw s1monw closed this as completed in 917c93d Mar 18, 2014
s1monw pushed a commit that referenced this issue Mar 18, 2014
Two changes:
1.  In the StupidBackoffScorer only look for the trigram if there is a bigram.
2.  Cache the frequencies in WordScorer so we don't look them up again and
again and again.  This is implemented by wrapping the TermsEnum in a special
purpose wrapper that really only works in context of the WordScorer.

This provides a pretty substantial speedup when there are many candidates.

Closes #5395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant