-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Support offset in composite aggs #50609
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3032d62
Support offset in composite aggs
nik9000 b8f692e
version checks
nik9000 95da5cb
use 8.0.0
nik9000 e7eea38
Revert "use 8.0.0"
nik9000 393388c
Disable bwc tests
nik9000 14de4c8
Merge branch 'master' into composite_date_offset
nik9000 b271143
Rework public interface and add wire tests
nik9000 08fc267
zlong
nik9000 2113c0e
Revert equals
nik9000 c2256e2
Fix up test case
nik9000 54f53ed
Disable some more bwc tests for the backport
nik9000 9d3c354
Merge branch 'master' into composite_date_offset
nik9000 fc77e34
Fix from review
nik9000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -243,7 +243,7 @@ setup: | |
--- | ||
"Composite aggregation with format": | ||
- skip: | ||
version: " - 7.1.99" | ||
version: " - 7.99.99" # after BWC merged revert to 7.1.99 | ||
reason: calendar_interval introduced in 7.2.0 | ||
features: warnings | ||
|
||
|
@@ -309,7 +309,7 @@ setup: | |
--- | ||
"Composite aggregation with format and calendar_interval": | ||
- skip: | ||
version: " - 7.1.99" | ||
version: " - 7.99.99" # after BWC merged revert to 7.1.99 | ||
reason: calendar_interval introduced in 7.2.0 | ||
|
||
- do: | ||
|
@@ -367,6 +367,40 @@ setup: | |
- match: { aggregations.test.buckets.0.key.date: "2017-10-21" } | ||
- match: { aggregations.test.buckets.0.doc_count: 1 } | ||
|
||
--- | ||
"Composite aggregation with date_histogram offset": | ||
- skip: | ||
version: " - 7.99.99" # after BWC merged revert to 7.5.99 | ||
reason: offset introduced in 8.0.0 | ||
|
||
- do: | ||
search: | ||
rest_total_hits_as_int: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's use the new format, this option should be removed soon. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure! |
||
index: test | ||
body: | ||
aggregations: | ||
test: | ||
composite: | ||
sources: [ | ||
{ | ||
"date": { | ||
"date_histogram": { | ||
"field": "date", | ||
"calendar_interval": "1d", | ||
"offset": "4h", | ||
"format": "iso8601" # Format makes the comparisons a little more obvious | ||
} | ||
} | ||
} | ||
] | ||
|
||
- match: {hits.total: 6} | ||
- length: { aggregations.test.buckets: 2 } | ||
- match: { aggregations.test.buckets.0.key.date: "2017-10-19T04:00:00.000Z" } | ||
- match: { aggregations.test.buckets.0.doc_count: 1 } | ||
- match: { aggregations.test.buckets.1.key.date: "2017-10-21T04:00:00.000Z" } | ||
- match: { aggregations.test.buckets.1.doc_count: 1 } | ||
|
||
--- | ||
"Composite aggregation with after_key in the response": | ||
- do: | ||
|
@@ -667,7 +701,6 @@ setup: | |
reason: geotile_grid is not supported until 7.5.0 | ||
- do: | ||
search: | ||
rest_total_hits_as_int: true | ||
index: test | ||
body: | ||
aggregations: | ||
|
@@ -690,7 +723,8 @@ setup: | |
] | ||
after: { "geo": "12/730/1590", "kw": "foo" } | ||
|
||
- match: {hits.total: 6} | ||
- match: { hits.total.value: 6 } | ||
- match: { hits.total.relation: "eq" } | ||
- length: { aggregations.test.buckets: 3 } | ||
- match: { aggregations.test.buckets.0.key.geo: "12/1236/1533" } | ||
- match: { aggregations.test.buckets.0.key.kw: "bar" } | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured because the option is the same I should just include the docs from the normal date histogram.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍