Rename fields to stored_fields and add docvalue_fields#18992
Rename fields to stored_fields and add docvalue_fields#18992jimczi merged 1 commit intoelastic:masterfrom jimczi:fields_rename
fields to stored_fields and add docvalue_fields#18992Conversation
There was a problem hiding this comment.
The commit message says fielddata_fields is deprecated but you've removed it above. Maybe it should be a deprecated alias for docvalue_fields?
There was a problem hiding this comment.
It's already a deprecated alias for docvalue_fields, see SearchSourceBuilder.DOCVALUE_FIELDS_FIELD declaration.
|
I wonder if we're ok removing the methods that you've deprecated rather than just deprecating them? If you do keep them as deprecated can you add a note about when we expect to remove them? Notes like that are nice because they make it obvious to the caller and to us when we can remove them. |
There was a problem hiding this comment.
I think you can drop the null check. It returns an empty array instead.
|
LGTM. I left only minor stuff. If you want I can make the documentation modifications that I proposed after you merge. |
`stored_fields` parameter will no longer try to retrieve fields from the _source but will only return stored fields. `fields` will throw an exception if the user uses it. Add `docvalue_fields` as an adjunct to `fielddata_fields` which is deprecated. `docvalue_fields` will try to load the value from the docvalue and fallback to fielddata cache if docvalues are not enabled on that field. Closes #18943
|
Thanks @nik9000 !
I think we should first remove the support for the fielddata cache. It should not be recommended and IMO it would be great if we can remove it completely. I'll open another issue to discuss ... |
|
Re-applied in afe99fc |
stored_fieldsparameter will no longer try to retrieve fields from the _source but will only return stored fields.fieldswill throw an exception if the user uses it.Add
docvalue_fieldsas an adjunct tofielddata_fieldswhich is deprecated.docvalue_fieldswill try to load the value from the docvalue and fallback to fielddata cache if docvalues are not enabled on that field.Closes #18943