Limit the maximum size of search results to a specified number of files.
When MaxFilesToRetrieve is non-zero, it controls the maximum size of the SearchResults that can be returned after a search. The most relevant documents from all matching documents in the index will be included in search results.
Regardless of the MaxFilesToRetrieve setting, FileCount will return the a count that includes all matching documents. MaxFilesToRetrieve limits the number of items saved in the returned SearchResults, but it does not stop the search before all matching documents have been identified.
For example, if you set MaxFilesToRetrieve=10 and AutoStopLimit=5000, then search results will contain the 10 most relevant documents from the first 5000 found. Documents after the first 5000 found will not be considered, because AutoStopLimit=5000 will force the search to halt after 5000 matching documents are found.
If the dtsSearchSelectMostRecent flag is set in SearchFlags, the most recent documents will be returned instead of the most relevant.