Elasticsearch does not support min_children
and max_children
for nested
datatypes by default (see: issue #10043). In case you need this behavior, this gist provides an alternative solution. Please note that I haven't benchmarked it against join queries.
To support min_children
and max_children
for your nested query, all you have to do is to use a function_score
query. To make this more concrete: you have an index called Person
with the following mapping:
first_name
(text)email
(text)