Skip to content

add explicit tests for geo_shape with doc values on old indices #52861

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 2 commits into from
Mar 5, 2020

Conversation

talevy
Copy link
Contributor

@talevy talevy commented Feb 27, 2020

This PR adds tests to verify behavior of geo-aggregations on indices that have
doc-values disabled by default due to an old index version.

the version bounds to 7.x can be updated after merge of geoshape-doc-values into master

@talevy talevy added WIP :Analytics/Geo Indexing, search aggregations of geo points and shapes labels Feb 27, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Geo)

@talevy talevy removed the WIP label Feb 27, 2020
@talevy talevy requested review from iverase and nknize February 27, 2020 18:39
@talevy talevy marked this pull request as ready for review February 27, 2020 18:39
}

public void test7xIndexWith8Index() {
SearchResponse response = client().prepareSearch(IDX_NAME_7x, IDX_NAME)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if am reading this correctly. If you mix index with different versions then we do not fail? Is this the expected behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is intentional? We fail shards that do not have doc-values, but since the other index is valid, the aggregation result is consistent.

It errors out if queried against an index with no geo_shape field at all.

I will double check other aggregations to see what is the most consistent behavior. I assume it is the same as is shown here

Copy link
Contributor

@iverase iverase Mar 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, and this assertion checks that some shards were not successful:

  assertThat(response.getSuccessfulShards(), lessThan(response.getTotalShards()));

Copy link
Contributor

@iverase iverase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@talevy talevy merged commit b773b46 into elastic:geoshape-doc-values Mar 5, 2020
@talevy talevy deleted the gdv-7x-indices branch March 5, 2020 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants