public class HasParentQueryBuilder extends AbstractQueryBuilder<HasParentQueryBuilder>
Writeable.Reader<R>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_SCORE |
static java.lang.String |
NAME |
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryName
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
HasParentQueryBuilder(StreamInput in) |
|
HasParentQueryBuilder(java.lang.String type,
QueryBuilder query) |
|
HasParentQueryBuilder(java.lang.String type,
QueryBuilder query,
boolean score,
InnerHitBuilder innerHit) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doEquals(HasParentQueryBuilder that)
Indicates whether some other
QueryBuilder object of the same type is "equal to" this one. |
protected int |
doHashCode() |
protected HasParentQueryBuilder |
doReadFrom(StreamInput in) |
protected QueryBuilder<?> |
doRewrite(QueryRewriteContext queryShardContext) |
protected org.apache.lucene.search.Query |
doToQuery(QueryShardContext context) |
protected void |
doWriteTo(StreamOutput out) |
protected void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
java.lang.String |
getWriteableName()
Returns the name of the writeable object
|
InnerHitBuilder |
innerHit()
Returns inner hit definition in the scope of this query and reusing the defined type and query.
|
HasParentQueryBuilder |
innerHit(InnerHitBuilder innerHit)
Sets inner hit definition in the scope of this query and reusing the defined type and query.
|
QueryBuilder |
query()
Returns the query to execute.
|
boolean |
score()
Returns
true if the parent score is mapped into the child documents |
HasParentQueryBuilder |
score(boolean score)
Defines if the parent score is mapped into the child documents.
|
java.lang.String |
type()
Returns the parents type name
|
addValidationError, boost, boost, convertToBytesRefIfString, convertToStringIfBytesRef, equals, getName, hashCode, printBoostAndQueryName, queryName, queryName, readFrom, readQueries, rewrite, toFilter, toQueries, toQuery, toXContent, writeQueries, writeTo
buildAsBytes, buildAsBytes, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
rewriteQuery
public static final java.lang.String NAME
public static final boolean DEFAULT_SCORE
public HasParentQueryBuilder(java.lang.String type, QueryBuilder query)
type
- The parent typequery
- The query that will be matched with parent documentspublic HasParentQueryBuilder(java.lang.String type, QueryBuilder query, boolean score, InnerHitBuilder innerHit)
protected HasParentQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
public HasParentQueryBuilder score(boolean score)
public HasParentQueryBuilder innerHit(InnerHitBuilder innerHit)
public QueryBuilder query()
public boolean score()
true
if the parent score is mapped into the child documentspublic java.lang.String type()
public InnerHitBuilder innerHit()
protected org.apache.lucene.search.Query doToQuery(QueryShardContext context) throws java.io.IOException
doToQuery
in class AbstractQueryBuilder<HasParentQueryBuilder>
java.io.IOException
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent
in class AbstractQueryBuilder<HasParentQueryBuilder>
java.io.IOException
public java.lang.String getWriteableName()
NamedWriteable
protected HasParentQueryBuilder doReadFrom(StreamInput in) throws java.io.IOException
doReadFrom
in class AbstractQueryBuilder<HasParentQueryBuilder>
java.io.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractQueryBuilder<HasParentQueryBuilder>
java.io.IOException
protected boolean doEquals(HasParentQueryBuilder that)
AbstractQueryBuilder
QueryBuilder
object of the same type is "equal to" this one.doEquals
in class AbstractQueryBuilder<HasParentQueryBuilder>
protected int doHashCode()
doHashCode
in class AbstractQueryBuilder<HasParentQueryBuilder>
protected QueryBuilder<?> doRewrite(QueryRewriteContext queryShardContext) throws java.io.IOException
doRewrite
in class AbstractQueryBuilder<HasParentQueryBuilder>
java.io.IOException