Simplified getFacet method return value.
WARNING: Breaking changes
The getFacet('price')
has changed. Old functionality is available through getLegacyFacet('price')
.
New return values for getFacet()
are:
Terms Facets
array(
'count' => 232,
'terms' => array(
array(
'term' => 'France',
'count' => 23,
'selected' => false // if previously selected as a filter
),
array(
'term' => 'Spain',
'count' => 2,
'selected' => true
),
...
)
);
Range Facets
array(
'count' => 232,
'from' => 23.2,
'to' => 443.1,
'selected_from' => 44, // if se;ected as filter. false otherwise
'selected_to' => 401 // if selected as filter
);