Skip to content

Make 0 as invalid value for min_children in has_child query #32949

Closed
@mayya-sharipova

Description

@mayya-sharipova

0 for min_children option in has_child query doesn't make sense, because:

  1. It is ambiguous. Does it mean to match only parents that either have children matching the specified constraints or no have no children at all.
  2. It currently behaves as a value of 1, that is if there is no at least 1 child matching a specified constrained, a parent document is not returned.

For these reasons, we should make 0 value as invalid value.

Related #21224

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions