Class TermsEnumRequest
- All Implemented Interfaces:
JsonpSerializable
Discover terms that match a partial string in an index. This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios.
If the complete
property in the response is false, the returned
terms set may be incomplete and should be treated as approximate. This can
occur due to a few reasons, such as a request timeout or a node error.
NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<TermsEnumRequest>
Json deserializer forTermsEnumRequest
static final Endpoint<TermsEnumRequest,
TermsEnumResponse, ErrorResponse> Endpoint "terms_enum
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Boolean
When true the provided search string is matched against index terms without case sensitivity.final String
field()
Required - The string to match at the start of indexed terms.final String
index()
Required - Comma-separated list of data streams, indices, and index aliases to search.final Query
Allows to filter an index shard if the provided query rewrites to match_none.static TermsEnumRequest
final String
API name:search_after
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final Integer
size()
How many matching terms to return.final String
string()
The string after which terms in the index should be returned.final Time
timeout()
The maximum length of time to spend collecting results.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forTermsEnumRequest
-
_ENDPOINT
Endpoint "terms_enum
".
-
-
Method Details
-
of
public static TermsEnumRequest of(Function<TermsEnumRequest.Builder, ObjectBuilder<TermsEnumRequest>> fn) -
caseInsensitive
When true the provided search string is matched against index terms without case sensitivity.API name:
case_insensitive
-
field
Required - The string to match at the start of indexed terms. If not provided, all terms in the field are considered.API name:
field
-
index
Required - Comma-separated list of data streams, indices, and index aliases to search. Wildcard (*) expressions are supported.API name:
index
-
indexFilter
Allows to filter an index shard if the provided query rewrites to match_none.API name:
index_filter
-
searchAfter
API name:search_after
-
size
How many matching terms to return.API name:
size
-
string
The string after which terms in the index should be returned. Allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request.API name:
string
-
timeout
The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty.API name:
timeout
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupTermsEnumRequestDeserializer
protected static void setupTermsEnumRequestDeserializer(ObjectDeserializer<TermsEnumRequest.Builder> op)
-