Class HasChildQuery.Builder

All Implemented Interfaces:
WithJson<HasChildQuery.Builder>, ObjectBuilder<HasChildQuery>
Enclosing class:
HasChildQuery

public static class HasChildQuery.Builder extends QueryBase.AbstractBuilder<HasChildQuery.Builder> implements ObjectBuilder<HasChildQuery>
Builder for HasChildQuery.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • ignoreUnmapped

      public final HasChildQuery.Builder ignoreUnmapped(@Nullable Boolean value)
      Indicates whether to ignore an unmapped type and not return any documents instead of an error.

      API name: ignore_unmapped

    • innerHits

      public final HasChildQuery.Builder innerHits(@Nullable InnerHits value)
      If defined, each search hit will contain inner hits.

      API name: inner_hits

    • innerHits

      If defined, each search hit will contain inner hits.

      API name: inner_hits

    • maxChildren

      public final HasChildQuery.Builder maxChildren(@Nullable Integer value)
      Maximum number of child documents that match the query allowed for a returned parent document. If the parent document exceeds this limit, it is excluded from the search results.

      API name: max_children

    • minChildren

      public final HasChildQuery.Builder minChildren(@Nullable Integer value)
      Minimum number of child documents that match the query required to match the query for a returned parent document. If the parent document does not meet this limit, it is excluded from the search results.

      API name: min_children

    • query

      public final HasChildQuery.Builder query(Query value)
      Required - Query you wish to run on child documents of the type field. If a child document matches the search, the query returns the parent document.

      API name: query

    • query

      Required - Query you wish to run on child documents of the type field. If a child document matches the search, the query returns the parent document.

      API name: query

    • query

      public final HasChildQuery.Builder query(QueryVariant value)
      Required - Query you wish to run on child documents of the type field. If a child document matches the search, the query returns the parent document.

      API name: query

    • scoreMode

      public final HasChildQuery.Builder scoreMode(@Nullable ChildScoreMode value)
      Indicates how scores for matching child documents affect the root parent document’s relevance score.

      API name: score_mode

    • type

      public final HasChildQuery.Builder type(String value)
      Required - Name of the child relationship mapped for the join field.

      API name: type

    • self

      protected HasChildQuery.Builder self()
      Specified by:
      self in class QueryBase.AbstractBuilder<HasChildQuery.Builder>
    • build

      public HasChildQuery build()
      Builds a HasChildQuery.
      Specified by:
      build in interface ObjectBuilder<HasChildQuery>
      Throws:
      NullPointerException - if some of the required fields are null.