I am migrating a Grails application using Elasticsearch Java v0.93 to version 5.5.3. One of the challenges I am facing is to migrate Facet Filter to a similar Aggregation.
Following is the code from the early version of Elasticsearch Java API:
FacetBuilders
.termsFacet("f").field("brand").size(50) // Your facet
.allTerms(true)
.facetFilter( // Your filter here
FilterBuilders.boolFilter()
);
As per the Elasticsearch Java API "Facets has been removed and it is recommended to use filter aggregation or filters aggregation.
Thanks!