Description
ES 2.x and 5.x
Currently when accessing nested fields via top level fields
, fielddata_fields
or docvalue_fields
at the top level using the dot notation (eg. nested_path.field.field, etc..) to represent the nested fields, ES does not validate to determine if the field is nested vs. a field with dots in field name. The end result is that fields
, fielddata_fields
or docvalue_fields
is not returned in the response and the end user will wonder if they have referenced an incorrect field name, if it's a bug, or if it is simply by design and have to be accessed a different way.
For nested fields, fields
, fielddata_fields
or docvalue_fields
can only be accessed via inner_hits
. It will be helpful to clarify this at a few locations in the documentation:
- https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-stored-fields.html
- https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-docvalue-fields.html
- And fielddata_fields (applicable prior to 5.0):
https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-request-fielddata-fields.html