Package org.opensearch.index.query
Class TermQueryBuilder
java.lang.Object
org.opensearch.index.query.AbstractQueryBuilder<TermQueryBuilder>
org.opensearch.index.query.BaseTermQueryBuilder<TermQueryBuilder>
org.opensearch.index.query.TermQueryBuilder
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.NamedWriteable
,org.opensearch.core.common.io.stream.Writeable
,org.opensearch.core.xcontent.ToXContent
,org.opensearch.core.xcontent.ToXContentObject
,QueryBuilder
,Rewriteable<QueryBuilder>
,WithFieldName
A Query that matches documents containing a term.
- Opensearch.internal:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
-
Field Summary
Fields inherited from class org.opensearch.index.query.BaseTermQueryBuilder
fieldName, value
Fields inherited from class org.opensearch.index.query.AbstractQueryBuilder
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryName
Fields inherited from interface org.opensearch.index.query.Rewriteable
MAX_REWRITE_ROUNDS
Fields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionTermQueryBuilder
(String fieldName, boolean value) TermQueryBuilder
(String fieldName, double value) TermQueryBuilder
(String fieldName, float value) TermQueryBuilder
(String fieldName, int value) TermQueryBuilder
(String fieldName, long value) TermQueryBuilder
(String fieldName, Object value) TermQueryBuilder
(String fieldName, String value) TermQueryBuilder
(org.opensearch.core.common.io.stream.StreamInput in) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addExtraXContent
(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) boolean
caseInsensitive
(boolean caseInsensitive) protected final boolean
doEquals
(TermQueryBuilder other) Indicates whether some otherQueryBuilder
object of the same type is "equal to" this one.protected final int
protected QueryBuilder
doRewrite
(QueryRewriteContext queryRewriteContext) protected org.apache.lucene.search.Query
doToQuery
(QueryShardContext context) protected void
doWriteTo
(org.opensearch.core.common.io.stream.StreamOutput out) static TermQueryBuilder
fromXContent
(org.opensearch.core.xcontent.XContentParser parser) Methods inherited from class org.opensearch.index.query.BaseTermQueryBuilder
doXContent, fieldName, value
Methods inherited from class org.opensearch.index.query.AbstractQueryBuilder
addValidationError, boost, boost, checkNegativeBoost, declareStandardFields, equals, extractInnerHitBuilders, getName, hashCode, parseInnerQueryBuilder, printBoostAndQueryName, queryName, queryName, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toQuery, toString, toXContent, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensearch.index.query.QueryBuilder
visit
Methods inherited from interface org.opensearch.core.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
- See Also:
-
DEFAULT_CASE_INSENSITIVITY
public static final boolean DEFAULT_CASE_INSENSITIVITY- See Also:
-
-
Constructor Details
-
TermQueryBuilder
- See Also:
-
TermQueryBuilder
- See Also:
-
TermQueryBuilder
- See Also:
-
TermQueryBuilder
- See Also:
-
TermQueryBuilder
- See Also:
-
TermQueryBuilder
- See Also:
-
TermQueryBuilder
- See Also:
-
TermQueryBuilder
Read from a stream.- Throws:
IOException
-
-
Method Details
-
caseInsensitive
-
caseInsensitive
public boolean caseInsensitive() -
doWriteTo
- Overrides:
doWriteTo
in classBaseTermQueryBuilder<TermQueryBuilder>
- Throws:
IOException
-
fromXContent
public static TermQueryBuilder fromXContent(org.opensearch.core.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
addExtraXContent
protected void addExtraXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Overrides:
addExtraXContent
in classBaseTermQueryBuilder<TermQueryBuilder>
- Throws:
IOException
-
doRewrite
- Overrides:
doRewrite
in classAbstractQueryBuilder<TermQueryBuilder>
- Throws:
IOException
-
doToQuery
- Specified by:
doToQuery
in classAbstractQueryBuilder<TermQueryBuilder>
- Throws:
IOException
-
getWriteableName
-
doHashCode
protected final int doHashCode()- Overrides:
doHashCode
in classBaseTermQueryBuilder<TermQueryBuilder>
-
doEquals
Description copied from class:AbstractQueryBuilder
Indicates whether some otherQueryBuilder
object of the same type is "equal to" this one.- Overrides:
doEquals
in classBaseTermQueryBuilder<TermQueryBuilder>
-