Package org.elasticsearch.join.query
Class JoinQueryBuilders
java.lang.Object
org.elasticsearch.join.query.JoinQueryBuilders
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.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.static ParentIdQueryBuilder
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(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
Constructs a new parent id query that returns all child documents of the specified type that point to the specified id.
-