-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
docs / test enhancement - added CONSOLE scripts for sampler aggs #22869
Conversation
…sampler and diversified_sampler aggs. Closes elastic#22746
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.
❤️
@@ -24,7 +24,6 @@ apply plugin: 'elasticsearch.docs-test' | |||
* only remove entries from this list. When it is empty we'll remove it | |||
* entirely and have a party! There will be cake and everything.... */ | |||
buildRestTests.expectedUnconvertedCandidates = [ | |||
'reference/aggregations/bucket/diversified-sampler-aggregation.asciidoc', |
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.
❤️
@@ -28,41 +34,121 @@ Example: | |||
"aggs": { | |||
"keywords": { | |||
"significant_terms": { | |||
"field": "text" | |||
"field": "tags", | |||
"exclude":["kibana", "javascript"] |
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.
Probably want to add a space
"sample": { | ||
"doc_count": 1000,<1> | ||
"doc_count": 1000<1>, |
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 think this is backwards. I should be 1000, <1>
or something.
The sampler and diversified_sampler aggs were missing executable CONSOLE tests.
The scores produced by the example queries are sensitive to changes in the index (e.g. numbers of deleted docs) so I have deliberately added logic to copy actual result values into the expected results we document in the example. I also wanted to provide examples to users that provide doc counts from multiple-shards but actually for test purposes wanted to use a single shard to produce deterministic results. These actual-vs-expected differences were, again, patched by test-response manipulations.
Closes #22746