-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Set readFromDocValues to false for geo_shape fields #64014
Conversation
@nreese Looks like this would also cause a migration to be needed? |
Why do you say that? In the past geo_shape fields were not |
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
@@ -51,7 +51,7 @@ function getDocValueAndSourceFields(indexPattern, fieldNames) { | |||
lang: field.lang, | |||
}, | |||
}; | |||
} else if (field.type !== ES_GEO_FIELD_TYPE.GEO_SHAPE && field.readFromDocValues) { | |||
} else if (field.readFromDocValues) { |
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.
Okay so the two cases here are:
- Old index pattern,
readFromDocValues
is false on geo_shape fields because it wasn't previously supported - New index pattern,
readFromDocValues
is false because of the logic change in the index pattern service
Is that right?
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.
That is correct.
For old index pattern readFromDocValues
was false because geo_shape did not support docvalues and aggregations.
For new index patterns readFromDocValues
should be false even though geo_shape has docvalues support and can support aggregations. This is do to changed in Elasticsearch 7.8 adding docvalue support to geo_shape fields
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.
This line is removing a quick fix just merged (into master and 7.8) a few days ago. We decided a better fix is at the index pattern level.
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.
App arch code changes here LGTM; thanks for the added tests!
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.
Code change LGTM, but did not run the change.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Elasticsearch has added doc value support for
geo_shape
. geo_shape field does not support docvalue_fields, see elastic/elasticsearch#55487 (comment) for context.This PR updates
shouldReadFieldFromDocValues
to return false forgeo_shape
fields.