You are here: C++ API > Classes > dtsSearchResults Class > dtsSearchResults::getTotalHits Method
Close
dtSearch Text Retrieval Engine Programmer's Reference
dtsSearchResults::getTotalHits Method

Returns the number of hits in all files retrieved in the search, which may be more than the number actually stored in search results

Syntax
C++
int getTotalHits();

If search results were generated by a search, TotalHits will contain the number hits in all documents retrieved in the search, including documents that were not retained in the SearchResults object due to the MaxFilesToRetreive limit. 

If search results were generated in any other way, such as through the unionWith or intersectionOf operations, then TotalHits will be the number of hits in the documents actually stored in search results.