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

Retrieving field values from field data #4005

Closed
rashidkpc opened this issue Oct 29, 2013 · 2 comments
Closed

Retrieving field values from field data #4005

rashidkpc opened this issue Oct 29, 2013 · 2 comments

Comments

@rashidkpc
Copy link

There are situations where it is advantageous to retrieve not the field as it was stored, but rather the value that was indexed. The example that spurred this was dates.

Dates are stored in a variety of formats, but are always normalized into a long for indexing. However, when retrieving dates they come back as stringw that need to be parsed into the language's native date object, which requires knowing their format. Field data's normalized long could be parsed into a date object without needing to know the original source field's format.

The proposed feature would allow the user to specify that they want the field value to be retrieved from field data using the format: _fielddata.fieldname, much like we support _source.fieldname.

Eg:

{
    "query": { 
        "match_all": {
        }
    },
    "fields": ["_fielddata.user.id"]
}
@javanna
Copy link
Member

javanna commented Feb 13, 2014

Closing, this was implemented in #4492 and #4728 .

@javanna javanna closed this as completed Feb 13, 2014
@rashidkpc
Copy link
Author

Awesome, thanks!

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

No branches or pull requests

2 participants