protected function SearchApiElasticsearchConnector::getFacetLimit in Elasticsearch Connector 7.2
Same name and namespace in other branches
- 7.5 modules/elasticsearch_connector_search_api/service.inc \SearchApiElasticsearchConnector::getFacetLimit()
- 7 modules/elasticsearch_connector_search_api/service.inc \SearchApiElasticsearchConnector::getFacetLimit()
Helper function that return facet limits
1 call to SearchApiElasticsearchConnector::getFacetLimit()
- SearchApiElasticsearchConnector::addSearchFacets in modules/
elasticsearch_connector_search_api/ service.inc - Helper function build facets in search.
File
- modules/
elasticsearch_connector_search_api/ service.inc, line 1811 - Provides a Elasticsearch-based service class for the Search API using Elasticsearch Connector module.
Class
- SearchApiElasticsearchConnector
- Search service class.
Code
protected function getFacetLimit(array $facet_info) {
// If no limit (-1) is selected, use the server facet limit option.
$facet_limit = !empty($facet_info['limit']) ? $facet_info['limit'] : -1;
if ($facet_limit < 0) {
$facet_limit = $this
->getOption('facet_limit', 10);
}
return $facet_limit;
}