NamedWriteable
, Writeable
, ToXContent
, ToXContentObject
, MultiTermQueryBuilder
, QueryBuilder
, Rewriteable<QueryBuilder>
public class PrefixQueryBuilder extends AbstractQueryBuilder<PrefixQueryBuilder> implements MultiTermQueryBuilder
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 |
---|---|
PrefixQueryBuilder(java.lang.String fieldName,
java.lang.String value) |
A Query that matches documents containing terms with a specified prefix.
|
PrefixQueryBuilder(StreamInput in) |
Read from a stream.
|
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
doEquals(PrefixQueryBuilder other) |
Indicates whether some other
QueryBuilder object of the same type is "equal to" this one. |
protected int |
doHashCode() |
|
protected org.apache.lucene.search.Query |
doToQuery(QueryShardContext context) |
|
protected void |
doWriteTo(StreamOutput out) |
|
void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
|
java.lang.String |
fieldName() |
|
static PrefixQueryBuilder |
fromXContent(XContentParser parser) |
|
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
java.lang.String |
rewrite() |
|
PrefixQueryBuilder |
rewrite(java.lang.String rewrite) |
|
java.lang.String |
value() |
addValidationError, boost, boost, declareStandardFields, doRewrite, equals, extractInnerHitBuilders, getName, hashCode, parseInnerQueryBuilder, printBoostAndQueryName, queryName, queryName, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toFilter, toQuery, toString, toXContent, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
boost, boost, getName, queryName, queryName, rewrite, toFilter, toQuery
toXContent
isFragment
public static final java.lang.String NAME
public PrefixQueryBuilder(java.lang.String fieldName, java.lang.String value)
fieldName
- The name of the fieldvalue
- The prefix querypublic PrefixQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractQueryBuilder<PrefixQueryBuilder>
java.io.IOException
public java.lang.String fieldName()
public java.lang.String value()
public PrefixQueryBuilder rewrite(java.lang.String rewrite)
public java.lang.String rewrite()
public void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent
in class AbstractQueryBuilder<PrefixQueryBuilder>
java.io.IOException
public static PrefixQueryBuilder fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException
public java.lang.String getWriteableName()
NamedWriteable
getWriteableName
in interface NamedWriteable
protected org.apache.lucene.search.Query doToQuery(QueryShardContext context) throws java.io.IOException
doToQuery
in class AbstractQueryBuilder<PrefixQueryBuilder>
java.io.IOException
protected final int doHashCode()
doHashCode
in class AbstractQueryBuilder<PrefixQueryBuilder>
protected boolean doEquals(PrefixQueryBuilder other)
AbstractQueryBuilder
QueryBuilder
object of the same type is "equal to" this one.doEquals
in class AbstractQueryBuilder<PrefixQueryBuilder>