Class JoinQueryBuilders

java.lang.Object
org.elasticsearch.join.query.JoinQueryBuilders

public abstract class JoinQueryBuilders extends Object
  • Constructor Details

    • JoinQueryBuilders

      public JoinQueryBuilders()
  • Method Details

    • hasChildQuery

      public static HasChildQueryBuilder hasChildQuery(String type, org.elasticsearch.index.query.QueryBuilder query, org.apache.lucene.search.join.ScoreMode scoreMode)
      Constructs a new has_child query, with the child type and the query to run on the child documents. The results of this query are the parent docs that those child docs matched.
      Parameters:
      type - The child type.
      query - The query.
      scoreMode - How the scores from the children hits should be aggregated into the parent hit.
    • hasParentQuery

      public static HasParentQueryBuilder hasParentQuery(String type, org.elasticsearch.index.query.QueryBuilder query, boolean score)
      Constructs a new parent query, with the parent type and the query to run on the parent documents. The results of this query are the children docs that those parent docs matched.
      Parameters:
      type - The parent type.
      query - The query.
      score - Whether the score from the parent hit should propagate to the child hit
    • parentId

      public static ParentIdQueryBuilder parentId(String type, String id)
      Constructs a new parent id query that returns all child documents of the specified type that point to the specified id.