List all field values in the index that match an expression
Parameters |
Description |
---|---|
String field |
The name of the field to enumerate. |
String toMatch |
Wildcard expression to match in the field. |
int nLimit |
Maximum number of values to obtain. |
The number of values found.
A SearchFilter can be used with listFieldValues to limit the results to values in a set of documents. Use setFilter to attach a SearchFilter to the WordListBuilder. When a SearchFilter is used, all counts returned by WordListBuilder are document counts. For example, if a word occurs 20 times in 7 documents, the count returned will be 7 for both GetNthWordCount and GetNthWordDocCount.
The field must have been designated as an enumerable field when the index was built. This is done using IndexJob.setEnumerableFields().
The maximum amount of text that can be stored in each stored field is the lesser of the maxStoredFieldSize option setting or 127 characters, including the field name.