[Lens] Improve field existence check data fetching #72012
Labels
enhancement
New value added to drive a business result
Feature:Lens
Project:RuntimeFields
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
See #70520
The main question here is whether we can stop making three requests for field existence, specifically the mapping request. The mapping request is used to determine that
.keyword
fields are multi-mapped, and we might have two ways of avoiding the need for this request:We could use the new
fields
request parameter, which is partially available: Search 'fields' option design + implementation elasticsearch#55363. This new API would let us skip the mapping and field_caps requests.We could skip the
mapping
query by adding thedocvalue_fields
parameter to the 500 docs search request for certain fields. There is a 100 field limit to this approach, so I think we probably can't use this in all cases.The new
fields
request parameter was introduced mostly to solve this problemThe text was updated successfully, but these errors were encountered: