Class CountRequest
- java.lang.Object
-
- org.opensearch.client.opensearch._types.RequestBase
-
- org.opensearch.client.opensearch.core.CountRequest
-
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class CountRequest extends RequestBase implements JsonpSerializable
Returns number of documents matching a query.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCountRequest.BuilderBuilder forCountRequest.-
Nested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<CountRequest>_DESERIALIZERJson deserializer forCountRequeststatic Endpoint<CountRequest,CountResponse,ErrorResponse>_ENDPOINTEndpoint "count".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.BooleanallowNoIndices()Whether to ignore if a wildcard indices expression resolves into no concrete indices.java.lang.Stringanalyzer()The analyzer to use for the query stringjava.lang.BooleananalyzeWildcard()Specify whether wildcard and prefix queries should be analyzed (default: false)OperatordefaultOperator()The default operator for query string query (AND or OR)java.lang.Stringdf()The field to use as default where no field prefix is given in the query stringjava.util.List<ExpandWildcard>expandWildcards()Whether to expand wildcard expression to concrete indices that are open, closed or both.java.lang.BooleanignoreThrottled()Whether specified concrete, expanded or aliased indices should be ignored when throttledjava.lang.BooleanignoreUnavailable()Whether specified concrete indices should be ignored when unavailable (missing or closed)java.util.List<java.lang.String>index()A comma-separated list of indices to restrict the resultsjava.lang.Booleanlenient()Specify whether format-based query failures (such as providing text to a numeric field) should be ignoredjava.lang.DoubleminScore()Include only documents with a specific_scorevalue in the resultstatic CountRequestof(java.util.function.Function<CountRequest.Builder,ObjectBuilder<CountRequest>> fn)java.lang.Stringpreference()Specify the node or shard the operation should be performed on (default: random)java.lang.Stringq()Query in the Lucene query string syntaxQueryquery()API name:queryjava.lang.Stringrouting()A comma-separated list of specific routing valuesvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupCountRequestDeserializer(ObjectDeserializer<CountRequest.Builder> op)java.lang.LongterminateAfter()The maximum count for each shard, upon reaching which the query execution will terminate early
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<CountRequest> _DESERIALIZER
Json deserializer forCountRequest
-
_ENDPOINT
public static final Endpoint<CountRequest,CountResponse,ErrorResponse> _ENDPOINT
Endpoint "count".
-
-
Method Detail
-
of
public static CountRequest of(java.util.function.Function<CountRequest.Builder,ObjectBuilder<CountRequest>> fn)
-
allowNoIndices
@Nullable public final java.lang.Boolean allowNoIndices()
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes_allstring or when no indices have been specified)API name:
allow_no_indices
-
analyzeWildcard
@Nullable public final java.lang.Boolean analyzeWildcard()
Specify whether wildcard and prefix queries should be analyzed (default: false)API name:
analyze_wildcard
-
analyzer
@Nullable public final java.lang.String analyzer()
The analyzer to use for the query stringAPI name:
analyzer
-
defaultOperator
@Nullable public final Operator defaultOperator()
The default operator for query string query (AND or OR)API name:
default_operator
-
df
@Nullable public final java.lang.String df()
The field to use as default where no field prefix is given in the query stringAPI name:
df
-
expandWildcards
public final java.util.List<ExpandWildcard> expandWildcards()
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
ignoreThrottled
@Nullable public final java.lang.Boolean ignoreThrottled()
Whether specified concrete, expanded or aliased indices should be ignored when throttledAPI name:
ignore_throttled
-
ignoreUnavailable
@Nullable public final java.lang.Boolean ignoreUnavailable()
Whether specified concrete indices should be ignored when unavailable (missing or closed)API name:
ignore_unavailable
-
index
public final java.util.List<java.lang.String> index()
A comma-separated list of indices to restrict the resultsAPI name:
index
-
lenient
@Nullable public final java.lang.Boolean lenient()
Specify whether format-based query failures (such as providing text to a numeric field) should be ignoredAPI name:
lenient
-
minScore
@Nullable public final java.lang.Double minScore()
Include only documents with a specific_scorevalue in the resultAPI name:
min_score
-
preference
@Nullable public final java.lang.String preference()
Specify the node or shard the operation should be performed on (default: random)API name:
preference
-
q
@Nullable public final java.lang.String q()
Query in the Lucene query string syntaxAPI name:
q
-
query
@Nullable public final Query query()
API name:query
-
routing
@Nullable public final java.lang.String routing()
A comma-separated list of specific routing valuesAPI name:
routing
-
terminateAfter
@Nullable public final java.lang.Long terminateAfter()
The maximum count for each shard, upon reaching which the query execution will terminate earlyAPI name:
terminate_after
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
setupCountRequestDeserializer
protected static void setupCountRequestDeserializer(ObjectDeserializer<CountRequest.Builder> op)
-
-