Using Agregations in WORDPRESS elasticsearch
-
HI there
I have been using the Facets Class to deliver facet results however i have realised facets is to be depreciated.
Given the code example i have below , is there away through the plugin to use the class resultSet or any other to collect aggregations?
Currently i am returning facets like below;
$facets = elasticsearch\Faceting::All(); $facetHTML = array(); foreach($facets as $type => $facet){ $facetHTML[$type] = array(); $cnt=0; foreach($facet['available'] as $option){ $facetHTML[$type][$cnt]['url'] = elasticsearch\Faceting::urlAdd(get_permalink(), $type, $option['slug']); $facetHTML[$type][$cnt]['name'] = $option['name']; $facetHTML[$type][$cnt]['count'] = $option['count']; $cnt++; } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Using Agregations in WORDPRESS elasticsearch’ is closed to new replies.