FOSElasticaBundle
FOSElasticaBundle copied to clipboard
Can't access Aggregation data via Finder; Pagerfanta deprecated `->getAdapter()`; Doc needs Update
The Usage Documentation, shows the following example to get Aggregation data:
...
$aggs = $companies->getAdapter()->getAggregations();
This is outdated, since Pagerfanta deprecated ->getAdapter() and there is no ->getAggregations() function within the AdapterInterface anymore.
I found no way to access aggregation data via the Finder as of now. Please correct me if I'm wrong.
We could easily provide this by making the TransformedFinders $searchable property accessible with a getter.
Then we could do something like
...
$companies = $this->finder->getSearchable()->search($query);
Some more Context: https://github.com/BabDev/Pagerfanta/issues/35