maxValuesPerFacet
'maxValuesPerFacet' => max_value
Can be used in these methods:
search,
setSettings,
browseObjects,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
set_settings,
browse,
generate_secured_api_key,
add_api_key,
update_api_key
search,
setSettings,
browse,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
set_settings,
browse_objects,
generate_secured_api_key,
add_api_key,
update_api_key
search,
setSettings,
browse
search,
setSettings,
browseObjects,
generateSecuredApiKey,
addApiKey,
updateApiKey
searchAsync,
setSettingsAsync,
browseAsync
Search,
SetSettings,
Browse,
GenerateSecuredApiKey,
AddApiKey,
UpdateApiKey
Search,
setSettings,
browse,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
SetSettings,
BrowseObjects,
GenerateSecuredAPIKey,
AddAPIKey,
UpdateAPIKey
search,
setSettings,
browse index,
generateSecuredApiKey,
add key,
update key
About this parameter
Maximum number of facet values to return for each facet during a regular search.
If you want to change the number of retrieved facet hits during a search for facet values, see maxFacetHits.
Usage notes:
- For performance reasons, the API enforces a hard limit of 1000 on
maxValuesPerFacet
. Any value above that limit will be interpreted as 1000.
Examples
Set default number of facet values to retrieve
1
2
3
$index->setSettings([
'maxValuesPerFacet' => 100
]);
Override default number of facet values to retrieve for the current search
1
2
3
$results = $index->search('query', [
'maxValuesPerFacet' => 50
]);