Search Block: count results per facet
In eea.facetednavigation we had a feature that would allow one to enable/disable result count per facet. This is also a major feature of modern search solutions like ElasticSearch or Solr.
Would be great to be able to enable counting per facet within Volto Search Block.
For this we will need:
- New RestAPI endpoint for counting
- [ ] RestAPI endpoint draft: https://github.com/plone/plone.restapi/pull/1637
- Volto integration:
- Enable/Disable counting per facet
- RestAPI calls
- Facet view update to include counts
SOLR API: https://solr.apache.org/guide/8_1/json-facet-api.html#bucketing-facet-example ES API: https://www.elastic.co/guide/en/app-search/current/facets.html
Plone Classic Faceted Navigation counter implementation:
- https://github.com/eea/eea.facetednavigation/blob/develop/eea/facetednavigation/widgets/widget.py#L345
Faceted navigation example from Plone Classic:
cc: @ionlizarazu
@avoinea what's the status for this one? It's ok to slate it for 18?
@sneridagh AFAIK there is no progress on it lately. Thus, I think it's safer to move it to 18.x. cc @razvanMiu
@sneridagh This is currently more of a proof-of-concept. It should wait for 18. Ideally, we should improve the API in ZCatalog/plone.app.querystring so that we don't have to duplicate code from them.
Any updates on this feature? Any advice of how to temporality support it?
@FarooqAlaulddin There is an open PR on plone.restapi https://github.com/plone/plone.restapi/pull/1637 that has to be refactored and move code upstream directly in ZCatalog and plone.app.querystring as @davisagli suggested :wink:
For anyone looking to add this feature prior to the official releases, you need:
Backend Support:
- https://github.com/plone/plone.restapi/pull/1637
- https://github.com/zopefoundation/Products.ZCatalog/pull/149
- https://github.com/plone/plone.app.querystring/pull/145
Volto:
- https://github.com/plone/volto/pull/5812