Search.../

totalCount

Returns the total number of documents that match the search.

Description

The totalCount returns the total number of documents that match the search, not just the number of documents in the current page.

Type:

numberRead Only

Was this helpful?

Get the total count of a search result

Copy Code
1let resultCount = results.totalCount; // 50
Perform a search and get the total count of the result

Copy Code
1import wixSearch from 'wix-search';
2
3// ...
4
5wixSearch.search(phrase)
6 .find()
7 .then( (results) => {
8 let resultCount = results.totalCount; // 50
9 } ) ;