Skip to content
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 @@ -24,9 +24,47 @@ setup:
- '{"number": 4}'
- '{"index": {}}'
- '{"number": 5}'
- '{"index": {}}'
- '{"number": 6}'
- '{"index": {}}'
- '{"number": 7}'
- '{"index": {}}'
- '{"number": 8}'
- '{"index": {}}'
- '{"number": 9}'
- '{"index": {}}'
- '{"number": 10}'
- '{"index": {}}'
- '{"number": 11}'

---
defaults:
- skip:
version: " - 7.8.99"
reason: added in 7.9.0
- do:
search:
body:
size: 0
aggs:
histo:
variable_width_histogram:
field: number
- match: { hits.total.value: 11 }
- length: { aggregations.histo.buckets: 10 }
- match: { aggregations.histo.buckets.0: {"min": -3.0, "key": -2.5, "max": -2.0, "doc_count": 2 } }
- match: { aggregations.histo.buckets.1: {"min": 1.0, "key": 1.0, "max": 1.0, "doc_count": 1 } }
- match: { aggregations.histo.buckets.2: {"min": 4.0, "key": 4.0, "max": 4.0, "doc_count": 1 } }
- match: { aggregations.histo.buckets.3: {"min": 5.0, "key": 5.0, "max": 5.0, "doc_count": 1 } }
- match: { aggregations.histo.buckets.4: {"min": 6.0, "key": 6.0, "max": 6.0, "doc_count": 1 } }
- match: { aggregations.histo.buckets.5: {"min": 7.0, "key": 7.0, "max": 7.0, "doc_count": 1 } }
- match: { aggregations.histo.buckets.6: {"min": 8.0, "key": 8.0, "max": 8.0, "doc_count": 1 } }
- match: { aggregations.histo.buckets.7: {"min": 9.0, "key": 9.0, "max": 9.0, "doc_count": 1 } }
- match: { aggregations.histo.buckets.8: {"min": 10.0, "key": 10.0, "max": 10.0, "doc_count": 1 } }
- match: { aggregations.histo.buckets.9: {"min": 11.0, "key": 11.0, "max": 11.0, "doc_count": 1 } }

---
"basic":
num_buckets:
- skip:
version: " - 7.8.99"
reason: added in 7.9.0
Expand All @@ -39,12 +77,48 @@ setup:
variable_width_histogram:
field: number
buckets: 3
- match: { hits.total.value: 5 }
- match: { hits.total.value: 11 }
- length: { aggregations.histo.buckets: 3 }
- match: { aggregations.histo.buckets.0.key: -2.5 }
- match: { aggregations.histo.buckets.0.doc_count: 2 }
- match: { aggregations.histo.buckets.1.key: 1.0 }
- match: { aggregations.histo.buckets.1.doc_count: 1 }
- match: { aggregations.histo.buckets.2.key: 4.5 }
- match: { aggregations.histo.buckets.2.doc_count: 2 }
- match: { aggregations.histo.buckets.0: {"min": -3.0, "key": -1.3333333333333333, "max": 1.0, "doc_count": 3 } }
- match: { aggregations.histo.buckets.1: {"min": 4.0, "key": 5.5, "max": 7.0, "doc_count": 4 } }
- match: { aggregations.histo.buckets.2: {"min": 8.0, "key": 9.5, "max": 11.0, "doc_count": 4 } }

---
shard_size:
- skip:
version: " - 7.8.99"
reason: added in 7.9.0
- do:
search:
body:
size: 0
aggs:
histo:
variable_width_histogram:
field: number
buckets: 2
shard_size: 10000 # This is an accuracy tuning parameter that the tests can't do much with. This just makes sure you can set it.
- match: { hits.total.value: 11 }
- length: { aggregations.histo.buckets: 2 }
- match: { aggregations.histo.buckets.0: {"min": -3.0, "key": -1.3333333333333333, "max": 1.0, "doc_count": 3 } }
- match: { aggregations.histo.buckets.1: {"min": 4.0, "key": 7.5, "max": 11.0, "doc_count": 8 } }

---
initial_buffer:
- skip:
version: " - 7.8.99"
reason: added in 7.9.0
- do:
search:
body:
size: 0
aggs:
histo:
variable_width_histogram:
field: number
buckets: 2
initial_buffer: 10000 # This is an accuracy tuning parameter that the tests can't do much with. This just makes sure you can set it.
- match: { hits.total.value: 11 }
- length: { aggregations.histo.buckets: 2 }
- match: { aggregations.histo.buckets.0: {"min": -3.0, "key": -1.3333333333333333, "max": 1.0, "doc_count": 3 } }
- match: { aggregations.histo.buckets.1: {"min": 4.0, "key": 7.5, "max": 11.0, "doc_count": 8 } }