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

[GIS] Updates mapping to reflect that in ES #28038

Merged
merged 1 commit into from Jan 8, 2019

Conversation

tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Jan 3, 2019

On start-up, Kibana migrations check the mappings of the Kibana index to
determine if there are differing mappings, if so, we re-index the data.

When setting "tree": "quadtree", ES is actually representing it in the mapping
as "strategy": "recursive". This causes the migrations to always run. These
are both defaults for the geo_shape data type, so there shouldn't be any adverse
effect here.

It's possible this is an underlying ES issue - I would expect setting this option to be represented in the mapping when it's fetched.

cc @aaronjcaldwell

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@tylersmalley
Copy link
Contributor Author

@elastic/kibana-gis someone mind sighing off on this change?

@@ -12,7 +12,7 @@
},
"bounds": {
"type": "geo_shape",
"tree": "quadtree"
"strategy": "recursive"
Copy link
Contributor

@nreese nreese Jan 4, 2019

Choose a reason for hiding this comment

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

You can remove strategy as well. In 6.6, geo_shape type was update to be implemented with BKD tree and all of these configuration are no longer needed. https://www.elastic.co/guide/en/elasticsearch/reference/6.x/geo-shape.html#geoshape-indexing-approach

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

On start-up, Kibana migrations check the mappings of the Kibana index to
determine if there are differing mappings, if so, we re-index the data.

When setting `"tree": "quadtree"`, ES is actually representing it in the mapping
as `"strategy": "recursive"`. This causes the migrations to always run. These
are both defaults for the geo_shape data type, so there shouldn't be any adverse
effect here.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

lgtm

@chrisdavies
Copy link
Contributor

Looks good to me, too. I just wanted to note that this appears to be a more general problem, and could resurface if someone else had a recursive strategy in one of their mappings, and then removed it. Is there a more general fix that would enable migrations to properly handle this for all cases?

@elasticmachine
Copy link
Contributor

💔 Build Failed

@tylersmalley
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@tylersmalley
Copy link
Contributor Author

Merging this - failures are consistent with those on Master from a now reverted PR - just waiting for release-manager to build a new snapshot.

@tylersmalley tylersmalley merged commit 45dfd50 into elastic:master Jan 8, 2019
tylersmalley added a commit to tylersmalley/kibana that referenced this pull request Jan 8, 2019
On start-up, Kibana migrations check the mappings of the Kibana index to
determine if there are differing mappings, if so, we re-index the data.

When setting `"tree": "quadtree"`, ES is actually representing it in the mapping
as `"strategy": "recursive"`. This causes the migrations to always run. These
are both defaults for the geo_shape data type, so there shouldn't be any adverse
effect here.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
tylersmalley added a commit to tylersmalley/kibana that referenced this pull request Jan 8, 2019
On start-up, Kibana migrations check the mappings of the Kibana index to
determine if there are differing mappings, if so, we re-index the data.

When setting `"tree": "quadtree"`, ES is actually representing it in the mapping
as `"strategy": "recursive"`. This causes the migrations to always run. These
are both defaults for the geo_shape data type, so there shouldn't be any adverse
effect here.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
tylersmalley added a commit that referenced this pull request Jan 8, 2019
On start-up, Kibana migrations check the mappings of the Kibana index to
determine if there are differing mappings, if so, we re-index the data.

When setting `"tree": "quadtree"`, ES is actually representing it in the mapping
as `"strategy": "recursive"`. This causes the migrations to always run. These
are both defaults for the geo_shape data type, so there shouldn't be any adverse
effect here.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@tylersmalley
Copy link
Contributor Author

6.7/6.x: 54414f3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants