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

docs / test enhancement - added CONSOLE scripts for sampler aggs #22869

Merged
merged 2 commits into from
Jan 31, 2017

Conversation

markharwood
Copy link
Contributor

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

@markharwood markharwood added :Analytics/Aggregations Aggregations >docs General docs changes >test Issues or PRs that are addressing/adding tests v5.3.0 v6.0.0-alpha1 labels Jan 30, 2017
@markharwood markharwood self-assigned this Jan 30, 2017
Copy link
Member

@nik9000 nik9000 left a 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',
Copy link
Member

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"]
Copy link
Member

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>,
Copy link
Member

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.

@markharwood markharwood merged commit c0d525b into elastic:master Jan 31, 2017
markharwood added a commit that referenced this pull request Jan 31, 2017
…22869)

Added missing CONSOLE scripts to documentation for sampler and diversified_sampler aggs.
Includes new StackOverflow index setup in build.gradle

Closes #22746
* Formatting tweaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations >docs General docs changes >test Issues or PRs that are addressing/adding tests v5.3.0 v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants