API Reference / API Parameters / maxValuesPerFacet
Type: integer
Engine default: 100
Parameter syntax
'maxValuesPerFacet' => max_value

Can be used in these methods:
search, setSettings, browseObjects, generateSecuredApiKey, addApiKey, updateApiKey

About this parameter# A

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# A

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
]);
Did you find this page helpful?
PHP v3