Skip to main content

Commands: Indexes: How to get index terms?

GetTerms will retrieve all stored terms for a field of an index.

Syntax

IEnumerable<string> GetTerms(
string index,
string field,
string fromValue,
int pageSize);
Parameters
indexstringName of an index
fieldstringIndex field
fromValuestringStarting point for a query, used for paging
pageSizeintMaximum number of terms that will be returned
Return Value
string[]Array of index terms.

Example

IEnumerable<string> terms = store
.DatabaseCommands
.GetTerms("Orders/Totals", "Company", null, 128);