Get terms in an index
- POST also GET /{index}/_terms_enum
Discover terms that match a partial string in an index. This API is designed for low-latency look-ups used in auto-complete scenarios.
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.
Request body
-
fieldstringrequired -
The string to match at the start of indexed terms. If not provided, all terms in the field are considered.
-
timeoutstring · default: 1s -
The maximum length of time to spend collecting results. If the timeout is exceeded the
completeflag set tofalsein the response and the results may be partial or empty. -
case_insensitiveboolean · default: false -
When
true, the provided search string is matched against index terms without case sensitivity. -
index_filterQuery -
Filter an index shard if the provided query rewrites to
match_none.