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

Handles exists query in composite aggs #35758

Merged
merged 7 commits into from
Nov 26, 2018

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Nov 20, 2018

This commit adds the support for exists query in the sorted execution mode
of the composite aggregation. We'll execute the aggregation from the sorted
points and use early termination if the main query is an exists query over the
first source of the composite aggregation.

This commit adds the support for exists query in the sorted execution mode
of the `composite` aggregation. We'll execute the aggregation from the sorted
points and use early termination if the main query is an `exists` query over the
first source of the `composite` aggregation.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

/**
* Returns true if we can use <code>query</code> with a {@link SortedDocsProducer} on <code>fieldName</code>.
*/
private static boolean checkQuery(Query query, String fieldName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

let's have a more explicit name maybe?

@jimczi jimczi merged commit 900caa2 into elastic:master Nov 26, 2018
@jimczi jimczi deleted the composite_exists_query branch November 26, 2018 18:08
jimczi added a commit that referenced this pull request Nov 26, 2018
This commit adds the support for exists query in the sorted execution mode
of the `composite` aggregation. We'll execute the aggregation from the sorted
points and use early termination if the main query is an `exists` query over the
first source of the `composite` aggregation.
jimczi added a commit that referenced this pull request Nov 26, 2018
This commit adds the support for exists query in the sorted execution mode
of the `composite` aggregation. We'll execute the aggregation from the sorted
points and use early termination if the main query is an `exists` query over the
first source of the `composite` aggregation.
@jimczi jimczi added the v6.5.2 label Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants