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

Merge stored/index fields into _formatted #1998

Merged
merged 5 commits into from
Nov 21, 2014

Conversation

rashidkpc
Copy link
Contributor

The goal of this was to close #1766 in which _timestamp was not working. The reason _timestamp doesn't work is because it is never returned, unless it is store: true and you explicitly ask for it. The pull does the following to resolve the issue:

  • Always requests all stored fields
  • Merges stored field values into _formatted for display in discover. This is also useful for scripted fields. (Saved scripted fields #1537)
  • Breaks out the field mapper for testing
  • Overrides the mapping of _timestamp to be date, since it always is and must be. This makes sure it is formatted as a date and is available for date_histogram aggs.

screen shot 2014-11-20 at 4 18 38 pm

@rashidkpc rashidkpc mentioned this pull request Nov 20, 2014
5 tasks
@rashidkpc rashidkpc added this to the 4.0.0-BETA3 milestone Nov 20, 2014
@@ -264,6 +264,8 @@ define(function (require) {
'match_all': {}
};
}
flatState.body.fields = ['*', '_source'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why this doesn't return a lot more data than it is. By including _source here does it prevent fields that are already in source from being sent as fields?

@spalger
Copy link
Contributor

spalger commented Nov 21, 2014

LGTM!

spalger pushed a commit that referenced this pull request Nov 21, 2014
Merge stored/index fields into _formatted
@spalger spalger merged commit 427c34d into elastic:master Nov 21, 2014
@gaving
Copy link

gaving commented Dec 1, 2014

👍

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

Successfully merging this pull request may close these issues.

_timestamp recognized as string, not date
3 participants