# Elasticsearch java client upgrade facet related issues

**URL:** <https://discuss.elastic.co/t/elasticsearch-java-client-upgrade-facet-related-issues/40814>\
**Category:** Elasticsearch\
**Created:** [February 3, 2016, 3:55am UTC](https://discuss.elastic.co/t/elasticsearch-java-client-upgrade-facet-related-issues/40814 "2016-02-03T03:55:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulrda](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@paulrda](https://discuss.elastic.co/u/paulrda)\
**Post date:** [February 3, 2016, 3:55am UTC](https://discuss.elastic.co/t/elasticsearch-java-client-upgrade-facet-related-issues/40814/1 "2016-02-03T03:55:30Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 3, 2016, 5:30am UTC](https://discuss.elastic.co/t/elasticsearch-java-client-upgrade-facet-related-issues/40814/2 "2016-02-03T05:30:50Z")

</div>

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

What this facet was supposed to do/count?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:19pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client-upgrade-facet-related-issues/40814/3 "2017-07-05T23:19:22Z")

</div>


