You are here

public function ApacheSolrFacetapiAdapter::getResultCount in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 plugins/facetapi/adapter.inc \ApacheSolrFacetapiAdapter::getResultCount()
  2. 6.3 plugins/facetapi/adapter.inc \ApacheSolrFacetapiAdapter::getResultCount()

Returns the number of total results found for the current search.

Return value

bool|int Number of results or false if no search response was found

File

plugins/facetapi/adapter.inc, line 134
Classes used by the Facet API module.

Class

ApacheSolrFacetapiAdapter
Facet API adapter for the Apache Solr Search Integration module.

Code

public function getResultCount() {
  $response = apachesolr_static_response_cache($this
    ->getSearcher());
  if ($response) {
    return $response->response->numFound;
  }
  return FALSE;
}