Links
dtSearch Text Retrieval Engine Programmer's Reference 7.70
dtsWordListBuilder::listFieldValues Method
dtsWordListBuilder Class | dtsWordListBuilder Class | See Also | Send Feedback

List all values of an enumerable field.

void listFieldValues(const char * fieldName, const char * toMatch, long maxWords);
Parameters
Parameters 
Description 
const char * fieldName 
The name of the field to enumerate 
const char * toMatch 
The expression to match, which may include wildcards 
long maxWords 
Maximum number of words to include in the list 
Remarks

The field must have been designated as an enumerable field (in dtsIndexJob.enumerableFields) when the index was created. If fieldName is not an enumerable field, no values will be returned. 

To limit the values returned to documents that are part of search results, use setSearchFilter

To improve performance in cases where the same field values have to be enumerated repeatedly with different SearchFilters, you can set the flag dtsWordListEnableFieldValuesCache using setFlags(). This will make listFieldValues calls from the same WordListBuilder faster at the cost of substantial memory use, because the field values and occurrences in the index will be stored in memory until the WordListBuilder is deleted. The amount of memory required is proportional to the number of documents in the index times the number of values in the enumerable field that is cached.

See Also
Class
Links
You are here: C++ API > Classes > dtsWordListBuilder Class > dtsWordListBuilder::listFieldValues Method
Copyright (c) 1995-2012 dtSearch Corp. All rights reserved.