maxFacetHits
10
'maxFacetHits' => number_of_facet_hits
Can be used in these methods:
search,
setSettings,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
set_settings,
browse_objects,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
setSettings,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
set_settings,
browse_objects,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
setSettings,
browse,
searchForFacetValues,
generateSecuredApiKey,
addAPIKey,
updateAPIKey
search,
setSettings,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
SetSettings,
Browse,
SearchForFacetValues,
GenerateSecuredApiKeys,
AddApiKey,
UpdateApiKey
Search,
setSettings,
browse,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
SetSettings,
BrowseObjects,
SearchForFacetValues,
GenerateSecuredAPIKey,
AddAPIKey,
UpdateAPIKey
search,
setSettings,
browse index,
search into facet values,
generateSecuredApiKey,
add key,
update key
About this parameter
Maximum number of facet hits to return during a search for facet values.
Usage notes
- Doesn’t apply to regular search queries.
- To determine the order in which facets are retrieved, see
searchForFacetValues
. - For performance reasons, the maximum allowed number of returned values is 100. Any value outside the range [1, 100] will be rejected.
- To change the number of retrieved facet values for a regular search, see
maxValuesPerFacet
.
Examples
Set default number of facet values to return during a search for facet values
1
2
3
$index->setSettings([
'maxFacetHits' => 10
]);
Override default number of facet values to return during a search for facet values for the current search
1
2
3
$facetValues = $index->searchForFacetValues("category", "phone", [
'maxFacetHits' => 5
]);