Class CountRequest
java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.core.CountRequest
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,ToCopyableBuilder<CountRequest.Builder,CountRequest>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public final class CountRequest
extends RequestBase
implements PlainJsonSerializable, ToCopyableBuilder<CountRequest.Builder,CountRequest>
Returns number of documents matching a query.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<CountRequest> Json deserializer forCountRequeststatic final Endpoint<CountRequest, CountResponse, ErrorResponse> Endpoint "count". -
Method Summary
Modifier and TypeMethodDescriptionfinal BooleanIffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indexes.final Stringanalyzer()Analyzer to use for the query string.final BooleanIftrue, wildcard and prefix queries are analyzed.protected voidapplyQueryParameters(Map<String, String> params) static CountRequest.Builderbuilder()final OperatorThe default operator for query string query:ANDorOR.final Stringdf()Field to use as default where no field prefix is given in the query string.booleanfinal List<ExpandWildcard> Specifies the type of index that wildcard expressions can match.inthashCode()final BooleanIftrue, concrete, expanded or aliased indexes are ignored when frozen.final BooleanIffalse, the request returns an error if it targets a missing or closed index.index()A comma-separated list of data streams, indexes, and aliases to search.final Booleanlenient()Iftrue, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.final FloatminScore()Sets the minimum_scorevalue that documents must have to be included in the result.static CountRequestfinal StringSpecifies the node or shard the operation should be performed on.final Stringq()Query in the Lucene query string syntax.final Queryquery()API name:queryrouting()A custom value used to route operations to a specific shard.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal IntegerMaximum number of documents to collect for each shard.Create a new builderToCopyableBuilderthat is initialised with the current state of this object.Methods inherited from class org.opensearch.client.opensearch._types.RequestBase
errorTrace, humanMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonStringMethods inherited from interface org.opensearch.client.util.ToCopyableBuilder
copy
-
Field Details
-
_DESERIALIZER
Json deserializer forCountRequest -
_ENDPOINT
Endpoint "count".
-
-
Method Details
-
of
-
allowNoIndices
Iffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indexes. This behavior applies even if the request targets other open indexes.API name:
allow_no_indices -
analyzeWildcard
Iftrue, wildcard and prefix queries are analyzed. This parameter can only be used when theqquery string parameter is specified.API name:
analyze_wildcard -
analyzer
Analyzer to use for the query string. This parameter can only be used when theqquery string parameter is specified.API name:
analyzer -
defaultOperator
The default operator for query string query:ANDorOR. This parameter can only be used when theqquery string parameter is specified.API name:
default_operator -
df
Field to use as default where no field prefix is given in the query string. This parameter can only be used when theqquery string parameter is specified.API name:
df -
expandWildcards
Specifies the type of index that wildcard expressions can match. Supports comma-separated values.API name:
expand_wildcards -
ignoreThrottled
Iftrue, concrete, expanded or aliased indexes are ignored when frozen.API name:
ignore_throttled -
index
A comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (*). To search all data streams and indexes, omit this parameter or use*or_all.API name:
index -
lenient
Iftrue, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.API name:
lenient -
minScore
Sets the minimum_scorevalue that documents must have to be included in the result.API name:
min_score -
preference
Specifies the node or shard the operation should be performed on. Random by default.API name:
preference -
q
Query in the Lucene query string syntax.API name:
q -
query
API name:query -
routing
A custom value used to route operations to a specific shard.API name:
routing -
terminateAfter
Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting.API name:
terminate_after -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toBuilder
Description copied from interface:ToCopyableBuilderCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<CountRequest.Builder,CountRequest> - Returns:
- a new builder instance.
-
builder
-
setupCountRequestDeserializer
-
applyQueryParameters
- Overrides:
applyQueryParametersin classRequestBase
-
hashCode
public int hashCode() -
equals
-