You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some differences to be aware of when switching over:
Unmapped fields will not be returned in the fields array (but are in _source).
Runtime fields and field aliases will be returned in the fields array (but are not in _source).
Object arrays are currently flattened. We have an opportunity to change this.
Nested objects are currently flattened but the plan is to unflatten them.
Multi-field sub fields will report values, where as in _source, only the parent field has a value and all sub fields work like empty fields.
Field values may be formatted differently. For example the number "1.5" ingested into source will be returned as "1" if the field is mapped to type long.
TODO: Disabled fields? Disabled fields are returned by source, are they returned in the fields array? This would be a problem, they want them to be displayed. They aren't searchable or filterable, but useful to grab values from them.
TODO: clarification on when _source is appropriate. e.g. drilled into views like in Uptime, Discover "raw" view.
Switch Synthetics over. Owner: @andrewvc (They own the mapping so no motivation to switch over, but also no problem switching over. 7.11 booked. Possibly 7.12? If _source goes away, they would have to switch over). Does not use data search services.
8.0
Starting in 8.0, I think we should consider not returning _source by default because it encourages developers to access field values from it.
The text was updated successfully, but these errors were encountered:
Project Fields
Access field values using the search fields response, not source.
Intro
It's common for Kibana developers to access field values from _source. This was made very apparent during the runtime fields mapping investigation.
This should be considered an anti-pattern, instead the new fields parameter on search requests should be used.
Differences
There are some differences to be aware of when switching over:
TODO: clarification on when _source is appropriate. e.g. drilled into views like in Uptime, Discover "raw" view.
Work items
TODO: get links for these items.
8.0
Starting in 8.0, I think we should consider not returning _source by default because it encourages developers to access field values from it.
The text was updated successfully, but these errors were encountered: