CottageLabs / facetview2

a pure javascript frontend for ElasticSearch search indices.
MIT License
79 stars 31 forks source link

What's the workaround for depreciated facet in elasticsearch? #22

Open keshavkmr48 opened 6 years ago

keshavkmr48 commented 6 years ago

As elastic search documentation says, facets have been depreciated. So whats the workaround? can we simply use aggs in place of facets in the script and use facetview2 ? does this change needs to be done everywhere including html and jquery or just while defining facets in html ?

richard-jones commented 6 years ago

We haven't tried to get facetview2 working over aggregations, so it's difficult to answer in detail. Probably for the most part it's just a case of modifying the query serialising aspects of the code, though there may be some gotchas.

For later versions of ES (including aggregation support), we are focusing our efforts on Edges (https://github.com/CottageLabs/edges), which supports all of the facetview2 behaviours, plus a lot more, but is not yet well documented or so easy to get started with.