protected function SearchApiElasticsearchBackend::getFacetLimit in Elasticsearch Connector 8.7
Same name and namespace in other branches
- 8 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::getFacetLimit()
- 8.2 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::getFacetLimit()
- 8.5 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::getFacetLimit()
- 8.6 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::getFacetLimit()
Helper function that return facet limits.
Parameters
array $facet_info: The facet info parameter.
Return value
int|null Returns facet limits.
1 call to SearchApiElasticsearchBackend::getFacetLimit()
- SearchApiElasticsearchBackend::addFacetOptions in src/
Plugin/ search_api/ backend/ SearchApiElasticsearchBackend.php - Helper function that adds options and returns facet.
File
- src/
Plugin/ search_api/ backend/ SearchApiElasticsearchBackend.php, line 988
Class
- SearchApiElasticsearchBackend
- Elasticsearch Search API Backend definition.
Namespace
Drupal\elasticsearch_connector\Plugin\search_api\backendCode
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;
}