dtSearch Engine API Reference 2023.02
IOptions::MaxWordsToRetrieve Property
long MaxWordsToRetrieve;

Maximum number of words that can be matched in a search. This can be any value from 16 to 256k. The default is 64k. If a search matches more unique words than the maxWordsToRetrieve limit, the error code dtsErMaxWords (137) will be returned.