NamedWriteable, Writeable, ToXContent, ToXContentObject, QueryBuilder, Rewriteable<QueryBuilder>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");
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
NAME |
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryNameMAX_REWRITE_ROUNDSEMPTY_PARAMS| Constructor | Description |
|---|---|
WrapperQueryBuilder(byte[] source) |
Creates a query builder given a query provided as a bytes array
|
WrapperQueryBuilder(java.lang.String source) |
Creates a query builder given a query provided as a string
|
WrapperQueryBuilder(BytesReference source) |
Creates a query builder given a query provided as a
BytesReference |
WrapperQueryBuilder(StreamInput in) |
Read from a stream.
|
| Modifier and Type | Method | 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, declareStandardFields, equals, extractInnerHitBuilders, hashCode, parseInnerQueryBuilder, printBoostAndQueryName, queryName, queryName, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toFilter, toQuery, toString, toXContent, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitrewrite, rewrite, rewrite, rewriteAndFetch, rewriteAndFetchisFragmentpublic 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