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
Add _source, _doc and _field support to fields #4492
Comments
@clintongormley to make sure I understand, you proposing this syntax:
and
Is that correct? |
We discussed this and decided to add a |
@dakrone and the workaround in the GET API.... |
@kimchy I currently have Is this acceptable, or should I work on adding support for |
I am personally ok with it, we have source filtering now for the get API, and doc notation is not supported for GET. The reason why doc / fielddata is problematic with GET API is that we support realtime get, and we might fetch the doc from the transaction log and not form Lucene. |
Sounds good, thanks! |
Adds a new FetchSubPhase, FieldDataFieldsFetchSubPhase, which loads the field data cache for a field and returns an array of values for the field. Also removes `doc['<field>']` and `_source.<field>` workaround no longer needed in field name resolving. Closes elastic#4492
Adds a new FetchSubPhase, FieldDataFieldsFetchSubPhase, which loads the field data cache for a field and returns an array of values for the field. Also removes `doc['<field>']` and `_source.<field>` workaround no longer needed in field name resolving. Closes #4492
Adds a new FetchSubPhase, FieldDataFieldsFetchSubPhase, which loads the field data cache for a field and returns an array of values for the field. Also removes `doc['<field>']` and `_source.<field>` workaround no longer needed in field name resolving. Closes #4492
Adds a new FetchSubPhase, FieldDataFieldsFetchSubPhase, which loads the field data cache for a field and returns an array of values for the field. Also removes `doc['<field>']` and `_source.<field>` workaround no longer needed in field name resolving. Closes elastic#4492
When requesting
fields
in the search, get, update, etc APIs, we should be able to control where those values come from with these prefixes:_source
: extract the field value from the_source
field_fields
: retrieve astored
field value_doc
: retrieve the value from fielddataThe
_doc
option is particularly useful for retrieving dates as, no matter the format they're specified in in the source, they will be accessible as milliseconds-since-the-epoch from fielddata, without the need to allow dynamic scripts.While on the subject, perhaps we should support this same syntax in scripting, instead of
docs['foo']
?The text was updated successfully, but these errors were encountered: