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

Don't report terms as live if all it's docs are filtered out #6221

Merged
merged 1 commit into from May 19, 2014

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented May 18, 2014

FilterableTermsEnum allows to filter stats by supplying per segment
bits. Today if all docs are filtered out the term is still reported as
live but shouldn't.

Relates to #6211

@markharwood
Copy link
Contributor

Looks good - the only possible side effect is in FilterableTermsEnum.seekExact() any IOException will now leave currentDocFreq as prior value whereas before it would set NOT_FOUND. I don't think we define expected behaviour or rely on it in the event of IOException so should be fine.

@s1monw
Copy link
Contributor Author

s1monw commented May 19, 2014

Looks good - the only possible side effect is in FilterableTermsEnum.seekExact() any IOException will now leave currentDocFreq as prior value whereas before it would set NOT_FOUND. I don't think we define expected behaviour or rely on it in the event of IOException so should be fine.

IMO what we see now is the right behavior. if we see and exception we don't change the internal state.

@markharwood
Copy link
Contributor

Makes sense

FilterableTermsEnum allows to filter stats by supplying per segment
bits. Today if all docs are filtered out the term is still reported as
live but shouldn't.

Relates to elastic#6211
@s1monw s1monw removed the review label May 19, 2014
@s1monw s1monw merged commit 72da764 into elastic:master May 19, 2014
@clintongormley clintongormley added the :Core/Infra/Core Core issues without another label label Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Core Core issues without another label v1.2.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants