Get Index Terms Operation



Get Terms example

# Define the get terms operation
# Pass the requested index-name, index-filed, start value & page size
get_terms_op = GetTermsOperation("Orders/Totals", "Employee", "employees/5-A", 10)

# Execute the operation by passing it to maintenance.send
field_terms = store.maintenance.send(get_terms_op)

# field_terms will contain alle the terms that come after term 'employees/5-A' for index-field 'Employee'

Syntax

class GetTermsOperation(MaintenanceOperation[List[str]]):
    def __init__(self, index_name: str, field: str, from_value: Optional[str], page_size: int = None): ...
Parameters Type Description
index_name str Name of an index to get terms for
field str Name of index-field to get terms for
from_value str (optional) The starting term from which to return results.
This term is not included in the results.
None - start from first term.
page_size int Number of terms to get.
None - return all terms.
Return value of store.maintenance.send(GetTermsOperation) Description
List[str] List of terms for the requested index-field.
Alphabetically ordered.