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.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
NAME |
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryName
MAX_REWRITE_ROUNDS
EMPTY_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, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
rewrite, rewrite, rewrite, rewriteAndFetch, rewriteAndFetch
isFragment
public static final java.lang.String NAME
public WrapperQueryBuilder(byte[] source)
public WrapperQueryBuilder(java.lang.String source)
public WrapperQueryBuilder(BytesReference source)
BytesReference
public WrapperQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractQueryBuilder<WrapperQueryBuilder>
java.io.IOException
public byte[] source()
public java.lang.String getName()
QueryBuilder
getName
in interface QueryBuilder
getName
in class AbstractQueryBuilder<WrapperQueryBuilder>
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent
in class AbstractQueryBuilder<WrapperQueryBuilder>
java.io.IOException
public static WrapperQueryBuilder fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException
public java.lang.String getWriteableName()
NamedWriteable
protected org.apache.lucene.search.Query doToQuery(QueryShardContext context) throws java.io.IOException
doToQuery
in class AbstractQueryBuilder<WrapperQueryBuilder>
java.io.IOException
protected int doHashCode()
doHashCode
in class AbstractQueryBuilder<WrapperQueryBuilder>
protected boolean doEquals(WrapperQueryBuilder other)
AbstractQueryBuilder
QueryBuilder
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