API Reference / API Parameters / maxFacetHits
Feb. 26, 2019
Type: integer
Engine default: 10
Parameter syntax
'maxFacetHits' => number_of_facet_hits

Can be used in these methods:

About this parameter

Maximum number of facet hits to return during a search for facet values.

If you want to change the number of retrieved facet values for a regular search, see maxValuesPerFacet.

Usage notes:

  • Does not apply to regular search queries.

  • For performance reasons, the maximum allowed number of returned values is 100. Any value outside the range [1, 100] will be rejected.

Examples

Set default number of facet values to return during a search for facet values.

1
2
3
$index->setSettings([
  'maxFacetHits' => 10
]);
1
2
3
$facetValues = $index->searchForFacetValues("category", "phone", [
  'maxFacetHits' => 5
]);

Did you find this page helpful?