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

Make sure size=0 works on the inner_hits level. #10388

Merged
merged 1 commit into from Apr 2, 2015

Conversation

martijnvg
Copy link
Member

PR for #10358

return topDocsCollector.topDocs(from(), size());

int topN = from() + size();
if (topN == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should just check size() == 0? If from is 3 and size 0, we still only need to count matches?

Copy link
Member Author

Choose a reason for hiding this comment

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

good point, I'll change that

@jpountz
Copy link
Contributor

jpountz commented Apr 2, 2015

Left one minor comment, otherwise LGTM. Feel free to push without further review!

@martijnvg martijnvg merged commit e390ef5 into elastic:master Apr 2, 2015
@martijnvg martijnvg deleted the inner_hits/size_0 branch May 18, 2015 23:26
@clintongormley clintongormley changed the title inner hits: Make sure size=0 works on the inner_hits level. Make sure size=0 works on the inner_hits level. May 29, 2015
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Inner Hits labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories v1.5.1 v1.6.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants