Get Index Terms Operation

Get Terms example

// Define the get terms operation
// Pass the requested index-name, index-field, start value & page size
const getTermsOp = new GetTermsOperation("Orders/Totals", "Employee", "employees/5-a", 10);

// Execute the operation by passing it to maintenance.send
const fieldTerms = await store.maintenance.send(getTermsOp);

// fieldTerms will contain the all terms that come after term 'employees/5-a' for index-field 'Employee'


// Available overloads:
const getTermsOp = new GetTermsOperation(indexName, field, fromValue);
const getTermsOp = new GetTermsOperation(indexName, field, fromValue, pageSize);
Parameters Type Description
indexName string Name of an index to get terms for
field string Name of index-field to get terms for
fromValue string The starting term from which to return results.
This term is not included in the results.
null - start from first term.
pageSize number Number of terms to get.
undefined/null - return all terms.
Return value of store.maintenance.send(getTermsOp) Description
string[] List of terms for the requested index-field.
Alphabetically ordered.