public class RegexpQueryBuilder extends AbstractQueryBuilder<RegexpQueryBuilder> implements MultiTermQueryBuilder
Writeable.Reader<V>, Writeable.Writer<V>ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_FLAGS_VALUE |
static int |
DEFAULT_MAX_DETERMINIZED_STATES |
static java.lang.String |
NAME |
boost, BOOST_FIELD, DEFAULT_BOOST, queryNameEMPTY_PARAMS| Constructor and Description |
|---|
RegexpQueryBuilder(StreamInput in)
Read from a stream.
|
RegexpQueryBuilder(java.lang.String fieldName,
java.lang.String value)
Constructs a new regex query.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doEquals(RegexpQueryBuilder 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) |
protected void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
java.lang.String |
fieldName()
Returns the field name used in this query.
|
int |
flags() |
RegexpQueryBuilder |
flags(int flags) |
RegexpQueryBuilder |
flags(RegexpFlag... flags) |
static java.util.Optional<RegexpQueryBuilder> |
fromXContent(QueryParseContext parseContext) |
java.lang.String |
getWriteableName()
Returns the name of the writeable object
|
int |
maxDeterminizedStates() |
RegexpQueryBuilder |
maxDeterminizedStates(int value)
Sets the regexp maxDeterminizedStates.
|
java.lang.String |
rewrite() |
RegexpQueryBuilder |
rewrite(java.lang.String rewrite) |
java.lang.String |
value()
Returns the value used in this query.
|
addValidationError, boost, boost, convertToBytesRefIfString, convertToStringIfBytesRef, declareStandardFields, doRewrite, equals, extractInnerHitBuilders, getName, hashCode, printBoostAndQueryName, queryName, queryName, readQueries, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toFilter, toQueries, toQuery, toXContent, writeQueries, writeTobuildAsBytes, buildAsBytes, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitboost, boost, getName, queryName, queryName, rewrite, rewriteQuery, toFilter, toQueryisFragment, toXContentpublic static final java.lang.String NAME
public static final int DEFAULT_FLAGS_VALUE
public static final int DEFAULT_MAX_DETERMINIZED_STATES
public RegexpQueryBuilder(java.lang.String fieldName,
java.lang.String value)
fieldName - The name of the fieldvalue - The regular expressionpublic RegexpQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOExceptionprotected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo in class AbstractQueryBuilder<RegexpQueryBuilder>java.io.IOExceptionpublic java.lang.String fieldName()
public java.lang.String value()
public RegexpQueryBuilder flags(RegexpFlag... flags)
public RegexpQueryBuilder flags(int flags)
public int flags()
public RegexpQueryBuilder maxDeterminizedStates(int value)
public int maxDeterminizedStates()
public RegexpQueryBuilder rewrite(java.lang.String rewrite)
public java.lang.String rewrite()
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent in class AbstractQueryBuilder<RegexpQueryBuilder>java.io.IOExceptionpublic static java.util.Optional<RegexpQueryBuilder> fromXContent(QueryParseContext parseContext) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getWriteableName()
NamedWriteablegetWriteableName in interface NamedWriteableprotected org.apache.lucene.search.Query doToQuery(QueryShardContext context) throws QueryShardException, java.io.IOException
doToQuery in class AbstractQueryBuilder<RegexpQueryBuilder>QueryShardExceptionjava.io.IOExceptionprotected int doHashCode()
doHashCode in class AbstractQueryBuilder<RegexpQueryBuilder>protected boolean doEquals(RegexpQueryBuilder other)
AbstractQueryBuilderQueryBuilder object of the same type is "equal to" this one.doEquals in class AbstractQueryBuilder<RegexpQueryBuilder>