-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Rename fields
to stored_fields
and add docvalue_fields
#18943
Comments
we could also maybe throw a nice exception, if the field is stored, we can suggest stored_fields, and if not, we can suggest source filtering? |
Should we make |
I think both should be deprecated aliases for the other side. It's trappy, but it at least allows people that are using those fields properly to get the right thing without an issue. Then remove them in 6.0. We should still throw an exception for bad usage, but presumably that check is in there anyway just because it has to be to ensure we do the right thing. |
This change replaces the fields parameter with stored_fields when it makes sense. This is dictated by the renaming we made in #18943 for the search API. The following list of endpoint has been changed to use `stored_fields` instead of `fields`: * get * mget * explain The documentation and the rest API spec has been updated to cope with the changes for the following APIs: * delete_by_query * get * mget * explain The `fields` parameter has been deprecated for the following APIs (it is replaced by _source filtering): * update: the fields are extracted from the _source directly. * bulk: the fields parameter is used but fields are extracted from the source directly so it is allowed to have non-stored fields. Some APIs still have the `fields` parameter for various reasons: * cat.fielddata: the fields paramaters relates to the fielddata fields that should be printed. * indices.clear_cache: used to indicate which fielddata fields should be cleared. * indices.get_field_mapping: used to filter fields in the mapping. * indices.stats: get stats on fields (stored or not stored). * termvectors: fields are retrieved from the stored fields if possible and extracted from the _source otherwise. * mtermvectors: * nodes.stats: the fields parameter is used to concatenate completion_fields and fielddata_fields so it's not related to stored_fields at all. Fixes #20155
This change replaces the fields parameter with stored_fields when it makes sense. This is dictated by the renaming we made in #18943 for the search API. The following list of endpoint has been changed to use `stored_fields` instead of `fields`: * get * mget * explain The documentation and the rest API spec has been updated to cope with the changes for the following APIs: * delete_by_query * get * mget * explain The `fields` parameter has been deprecated for the following APIs (it is replaced by _source filtering): * update: the fields are extracted from the _source directly. * bulk: the fields parameter is used but fields are extracted from the source directly so it is allowed to have non-stored fields. Some APIs still have the `fields` parameter for various reasons: * cat.fielddata: the fields paramaters relates to the fielddata fields that should be printed. * indices.clear_cache: used to indicate which fielddata fields should be cleared. * indices.get_field_mapping: used to filter fields in the mapping. * indices.stats: get stats on fields (stored or not stored). * termvectors: fields are retrieved from the stored fields if possible and extracted from the _source otherwise. * mtermvectors: * nodes.stats: the fields parameter is used to concatenate completion_fields and fielddata_fields so it's not related to stored_fields at all. Fixes #20155
This change replaces the fields parameter with stored_fields when it makes sense. This is dictated by the renaming we made in #18943 for the search API. The following list of endpoint has been changed to use `stored_fields` instead of `fields`: * get * mget * explain The documentation and the rest API spec has been updated to cope with the changes for the following APIs: * delete_by_query * get * mget * explain The `fields` parameter has been deprecated for the following APIs (it is replaced by _source filtering): * update: the fields are extracted from the _source directly. * bulk: the fields parameter is used but fields are extracted from the source directly so it is allowed to have non-stored fields. Some APIs still have the `fields` parameter for various reasons: * cat.fielddata: the fields paramaters relates to the fielddata fields that should be printed. * indices.clear_cache: used to indicate which fielddata fields should be cleared. * indices.get_field_mapping: used to filter fields in the mapping. * indices.stats: get stats on fields (stored or not stored). * termvectors: fields are retrieved from the stored fields if possible and extracted from the _source otherwise. * mtermvectors: * nodes.stats: the fields parameter is used to concatenate completion_fields and fielddata_fields so it's not related to stored_fields at all. Fixes #20155
As of #15017 the
fields
parameter will no longer try to retrieve fields from the_source
but will only return stored fields. This is a breaking change and there is nothing to warn the user that their response may well be different.Instead, let's rename
fields
tostored_fields
and throw an exception if the user usesfields
.Also, add
docvalue_fields
as an adjunct tofielddata_fields
The text was updated successfully, but these errors were encountered: