Get Index Terms Operation



Get Terms example

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

// Execute the operation by passing it to Maintenance.Send
string[] fieldTerms = store.Maintenance.Send(getTermsOp);

// fieldTerms will contain the all terms that come after term 'employees/5-a' for index-field 'Employee'
// Define the get terms operation
// Pass the requested index-name, index-field, start value & page size
var getTermsOp = new GetTermsOperation("Orders/Totals", "Employee", "employees/5-a", 10);

// Execute the operation by passing it to Maintenance.SendAsync
string[] fieldTerms = await store.Maintenance.SendAsync(getTermsOp);

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

Syntax

public GetTermsOperation(string indexName, string field, string fromValue, int? pageSize = null)
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 int? Number of terms to get.
null - return all terms.
Return value of store.Maintenance.Send(getTermsOp) Description
string[] List of terms for the requested index-field.
Alphabetically ordered.