Package org.elasticsearch.join.query
Class JoinQueryBuilders
java.lang.Object
org.elasticsearch.join.query.JoinQueryBuilders
public abstract class JoinQueryBuilders
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description JoinQueryBuilders()
-
Method Summary
Modifier and Type Method Description static HasChildQueryBuilder
hasChildQuery(java.lang.String type, 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.static HasParentQueryBuilder
hasParentQuery(java.lang.String type, QueryBuilder query, boolean score)
Constructs a new parent query, with the parent type and the query to run on the parent documents.static ParentIdQueryBuilder
parentId(java.lang.String type, java.lang.String id)
Constructs a new parent id query that returns all child documents of the specified type that point to the specified id.
-
Constructor Details
-
JoinQueryBuilders
public JoinQueryBuilders()
-
-
Method Details
-
hasChildQuery
public static HasChildQueryBuilder hasChildQuery(java.lang.String type, 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(java.lang.String type, 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
Constructs a new parent id query that returns all child documents of the specified type that point to the specified id.
-