public class WrapperQueryBuilder extends AbstractQueryBuilder<WrapperQueryBuilder>
Example usage in a boolean query :
BoolQueryBuilder bool = new BoolQueryBuilder();
bool.must(new WrapperQueryBuilder("{\"term\": {\"field\":\"value\"}}");
bool.must(new TermQueryBuilder("field2","value2");
Writeable.Reader<V>, Writeable.Writer<V>ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryNameEMPTY_PARAMSMAX_REWRITE_ROUNDS| Constructor and Description |
|---|
WrapperQueryBuilder(byte[] source)
Creates a query builder given a query provided as a bytes array
|
WrapperQueryBuilder(BytesReference source)
Creates a query builder given a query provided as a
BytesReference |
WrapperQueryBuilder(StreamInput in)
Read from a stream.
|
WrapperQueryBuilder(java.lang.String source)
Creates a query builder given a query provided as a string
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doEquals(WrapperQueryBuilder other)
Indicates whether some other
QueryBuilder object of the same type is "equal to" this one. |
protected int |
doHashCode() |
protected QueryBuilder |
doRewrite(QueryRewriteContext context) |
protected org.apache.lucene.search.Query |
doToQuery(QueryShardContext context) |
protected void |
doWriteTo(StreamOutput out) |
protected void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
static WrapperQueryBuilder |
fromXContent(XContentParser parser) |
java.lang.String |
getName()
Returns the name that identifies uniquely the query
|
java.lang.String |
getWriteableName()
Returns the name of the writeable object
|
byte[] |
source() |
addValidationError, boost, boost, convertToBytesRefIfString, convertToStringIfBytesRef, declareStandardFields, equals, extractInnerHitBuilders, hashCode, parseInnerQueryBuilder, printBoostAndQueryName, queryName, queryName, readQueries, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toFilter, toQueries, toQuery, toXContent, writeQueries, writeTobuildAsBytes, buildAsBytes, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitisFragmentrewrite, rewrite, rewrite, rewriteAndFetch, rewriteAndFetchpublic static final java.lang.String NAME
public WrapperQueryBuilder(byte[] source)
public WrapperQueryBuilder(java.lang.String source)
public WrapperQueryBuilder(BytesReference source)
BytesReferencepublic WrapperQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOExceptionprotected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo in class AbstractQueryBuilder<WrapperQueryBuilder>java.io.IOExceptionpublic byte[] source()
public java.lang.String getName()
QueryBuildergetName in interface QueryBuildergetName in class AbstractQueryBuilder<WrapperQueryBuilder>protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent in class AbstractQueryBuilder<WrapperQueryBuilder>java.io.IOExceptionpublic static WrapperQueryBuilder fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getWriteableName()
NamedWriteableprotected org.apache.lucene.search.Query doToQuery(QueryShardContext context) throws java.io.IOException
doToQuery in class AbstractQueryBuilder<WrapperQueryBuilder>java.io.IOExceptionprotected int doHashCode()
doHashCode in class AbstractQueryBuilder<WrapperQueryBuilder>protected boolean doEquals(WrapperQueryBuilder other)
AbstractQueryBuilderQueryBuilder object of the same type is "equal to" this one.doEquals in class AbstractQueryBuilder<WrapperQueryBuilder>protected QueryBuilder doRewrite(QueryRewriteContext context) throws java.io.IOException
doRewrite in class AbstractQueryBuilder<WrapperQueryBuilder>java.io.IOException