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

Fix division by zero in phrase suggester that causes assertion to fail #27149

Merged

Conversation

martijnvg
Copy link
Member

No description provided.

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering that this value works only with a single segment I wonder if we should remove it entirely from the formula. There is a related PR #27125 that wants to modify the formula so I think we can continue this discussion there and just fix the test assertion with this PR. LGTM for the fix until we decide what to do with this signal.

@martijnvg
Copy link
Member Author

@jimczi Agreed, I'll merge this now. In almost all cases terms.size() is not adding anything useful here, so makes to change that later on in #27125.

@martijnvg martijnvg force-pushed the phrase_suggester_tiny_index_egde_case branch from d606e8b to c406a91 Compare October 30, 2017 08:05
@martijnvg martijnvg merged commit c406a91 into elastic:master Oct 30, 2017
@martijnvg martijnvg added the >bug label Oct 30, 2017
@lcawl lcawl added v6.0.0-rc2 and removed v6.0.0 labels Oct 30, 2017
@lcawl lcawl removed the v6.1.0 label Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants