WARNING: Version 2.2 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Parent/child has been rewritten completely to reduce memory usage and to
has_parent queries faster and more efficient. The
_parent field uses doc values by default. The refactored and improved
implementation is only active for indices created on or after version 2.0.
In order to benefit from all the performance and memory improvements, we
recommend reindexing all existing indices that use the
A mapping type is declared as a child of another mapping type by specifying
_parent meta field:
The mapping for the parent type can be added at the same time as the mapping for the child type, but cannot be added before the child type.
top_children query has been removed in favour of the
It wasn’t always faster than the
has_child query and the results were usually
inaccurate. The total hits and any aggregations in the same search request
would be incorrect if
top_children was used.