WARNING: Version 5.x 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 Id Query Usage
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Parent Id Query Usage
editThe parent_id query can be used to find child documents which belong to a particular parent.
See the Elasticsearch documentation on parent_id query for more details.
Fluent DSL example
editq
.ParentId(p => p
.Name("named_query")
.Type<Developer>()
.Id(Project.First.Name)
)
Object Initializer syntax example
editnew ParentIdQuery
{
Name = "named_query",
Type = Infer.Type<Developer>(),
Id = Project.First.Name
}
Example json output.
{
"parent_id": {
"_name": "named_query",
"type": "developer",
"id": "Lesch Group"
}
}