Skip to content

Rest tests for Composite Histogarm #94753

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

Merged
merged 6 commits into from
Apr 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ setup:
- match: { aggregations.test.buckets.1.doc_count: 2 }

---
"Nested Composite aggregation":
"Composite aggregation with multiple terms sources":
- do:
search:
rest_total_hits_as_int: true
Expand Down Expand Up @@ -311,6 +311,134 @@ setup:
- match: { aggregations.test.buckets.4.key.long: 1000 }
- match: { aggregations.test.buckets.4.key.kw: "bar" }
- match: { aggregations.test.buckets.4.doc_count: 1 }
---
"Basic numeric histogram":
- skip:
version: " - 8.3.99"
reason: Multivalue Handling changed in 8.4
- do:
search:
rest_total_hits_as_int: true
index: test
body:
aggregations:
test:
composite:
sources: [
"histo": {
"histogram": {
"field": "long",
"interval": 50
}
}
]

- match: {hits.total: 6}
- length: { aggregations.test.buckets: 3 }
- match: { aggregations.test.buckets.0.key.histo: 0}
- match: { aggregations.test.buckets.0.doc_count: 3}
- match: { aggregations.test.buckets.1.key.histo: 100}
- match: { aggregations.test.buckets.1.doc_count: 1}
- match: { aggregations.test.buckets.2.key.histo: 1000}
- match: { aggregations.test.buckets.2.doc_count: 1}
---
"Basic numeric histogram legacy multivalue":
- skip:
version: " 8.4.0 - "
reason: Multivalue Handling changed in 8.4
- do:
search:
rest_total_hits_as_int: true
index: test
body:
aggregations:
test:
composite:
sources: [
"histo": {
"histogram": {
"field": "long",
"interval": 50
}
}
]

- match: {hits.total: 6}
- length: { aggregations.test.buckets: 3 }
- match: { aggregations.test.buckets.0.key.histo: 0}
- match: { aggregations.test.buckets.0.doc_count: 4}
- match: { aggregations.test.buckets.1.key.histo: 100}
- match: { aggregations.test.buckets.1.doc_count: 1}
- match: { aggregations.test.buckets.2.key.histo: 1000}
- match: { aggregations.test.buckets.2.doc_count: 1}
---
"Basic numeric histogram with missing bucket":
- skip:
version: " - 8.3.99"
reason: Multivalue Handling changed in 8.4
- do:
search:
rest_total_hits_as_int: true
index: test
body:
aggregations:
test:
composite:
sources: [
"histo": {
"histogram": {
"field": "long",
"interval": 50,
"missing_bucket": true
}
}
]

- match: {hits.total: 6}
- length: { aggregations.test.buckets: 4 }
- match: { aggregations.test.buckets.0.key.histo: null}
- match: { aggregations.test.buckets.0.doc_count: 3}
- match: { aggregations.test.buckets.1.key.histo: 0}
- match: { aggregations.test.buckets.1.doc_count: 3}
- match: { aggregations.test.buckets.2.key.histo: 100}
- match: { aggregations.test.buckets.2.doc_count: 1}
- match: { aggregations.test.buckets.3.key.histo: 1000}
- match: { aggregations.test.buckets.3.doc_count: 1}
---
"Basic numeric histogram with missing bucket order desc":
- skip:
version: " - 8.3.99"
reason: Multivalue Handling changed in 8.4
- do:
search:
rest_total_hits_as_int: true
index: test
body:
aggregations:
test:
composite:
sources: [
"histo": {
"histogram": {
"field": "long",
"interval": 50,
"order": "desc",
"missing_bucket": true
}
}
]

- match: {hits.total: 6}
- length: { aggregations.test.buckets: 4 }
- match: { aggregations.test.buckets.3.key.histo: null}
- match: { aggregations.test.buckets.3.doc_count: 3}
- match: { aggregations.test.buckets.2.key.histo: 0}
- match: { aggregations.test.buckets.2.doc_count: 3}
- match: { aggregations.test.buckets.1.key.histo: 100}
- match: { aggregations.test.buckets.1.doc_count: 1}
- match: { aggregations.test.buckets.0.key.histo: 1000}
- match: { aggregations.test.buckets.0.doc_count: 1}


---
"Aggregate After":
Expand Down