FacetParam uses ConstantsTrait
The HTTP-side **values** of the facet surface — the words a client may write in a query parameter, as opposed to the parameter *names*.
Unlike GroupParam, which carries the short keys of the ?group={...}
JSON spec, the facet parameters take plain scalars, so the only vocabulary
they need is this one. The parameter names themselves
(Arango::FACET_COUNTS,
Arango::FACET_COUNTS_LIMIT,
Arango::FACETS_ONLY) live on Arango alongside
every other query-parameter name, and stay there: they are published
constants consuming projects already reference.
The words declared here never reach the model: the controller translates them
into the model's own contract, the way
PrepareGroupTrait::prepareGroup()
maps GroupParam onto Group. That is what
keeps the model free of any HTTP vocabulary.
Tags
Table of Contents
Constants
- ALL : string = 'all'
- The `?facetCountsLimit=all` keyword: return **every** bucket, overriding a `Facet::LIMIT` declared on the facet.
Constants
ALL
The `?facetCountsLimit=all` keyword: return **every** bucket, overriding a `Facet::LIMIT` declared on the facet.
public
string
ALL
= 'all'
A word rather than a number, and deliberately so: 0 would read as "no
bucket" to whoever writes it and compile to "every bucket" — the ambiguity
FacetCountsQueryTrait refuses.
One rule holds everywhere: a limit is a positive integer, and "all of
them" is said with this word.
Translated by
PrepareFacetCountsLimitTrait::prepareFacetCountsLimit()
into the model-level false — "explicitly unlimited", which the model
tells apart from an absent parameter ("use the declaration").