Elasticsearch java client upgrade facet related issues


(Paul Alles) #1

im really new to elasticsearch. while leaning elasticsearch i need to update to elasticsearch version 2.1.1 from 0.60.2. we have a java client and when i upgrade maven dependancy to 2.1.1 version i got lot of compiler errors.most of the them relates to facet package related errors. now im replacing facet with aggregation but im stuck in this old facet code and i couldnt find any documentation related to CountEntry class.

final List entries = ourSearchService.facetQuery(facetQuery, facetKey);

for (CountEntry entry : entries) {

}
i couldnt find a way to replace "CountEntry" with aggregation related function. i think CountEntry comes from

org.elasticsearch.search.facet.datehistogram.InternalCountDateHistogramFacet.CountEntry
how can i replace CountEntry in elasticsearch version 2.1.1 ?


(David Pilato) #2

Did you look in https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-aggs.html?

What this facet was supposed to do/count?


(system) #3