# Case (lower and upper) issue with TermsFacetBuilder result

**URL:** <https://discuss.elastic.co/t/case-lower-and-upper-issue-with-termsfacetbuilder-result/15239>\
**Category:** Elasticsearch\
**Created:** [January 15, 2014, 4:59am UTC](https://discuss.elastic.co/t/case-lower-and-upper-issue-with-termsfacetbuilder-result/15239 "2014-01-15T04:59:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chetana](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chetana](https://discuss.elastic.co/u/Chetana)\
**Post date:** [January 15, 2014, 4:59am UTC](https://discuss.elastic.co/t/case-lower-and-upper-issue-with-termsfacetbuilder-result/15239/1 "2014-01-15T04:59:41Z")

</div>

I am using the 'term facet' functionality of ElasticSearch 0.90.2 on a  
paticular field (datatype). The field (datatype) stores one of the enum  
values in camel case (example : sampleType). I am using a standard analyzer  
for index and search which internally uses lowercase filter. The strange  
thing is that when I get the results for facets. I get 2 counts. One with  
lowercase and the other with camel case. Is there any workaround for this ?

The facet result looks like :

"facets" : {

"datatype" : {

"\_type" : "terms",

"missing" : 5,

"total" : 62,

"other" : 0,

"terms" : [ {

"term" : "sample_t_ype",

"count" : 30

}, {

"term" : "sample_T_ype",

"count" : 20

}  
}  
}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/caf5a9d3-e5e5-417b-bf71-e6340d8e14cb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/caf5a9d3-e5e5-417b-bf71-e6340d8e14cb%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Chetana](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chetana](https://discuss.elastic.co/u/Chetana)\
**Post date:** [January 15, 2014, 6:20am UTC](https://discuss.elastic.co/t/case-lower-and-upper-issue-with-termsfacetbuilder-result/15239/2 "2014-01-15T06:20:11Z")

</div>

I have observed this behavior on Ubantu 11.10 version.

On Wednesday, January 15, 2014 10:29:41 AM UTC+5:30, Chetana wrote:

> I am using the 'term facet' functionality of Elasticsearch 0.90.2 on a  
> paticular field (datatype). The field (datatype) stores one of the enum  
> values in camel case (example : sampleType). I am using a standard analyzer  
> for index and search which internally uses lowercase filter. The strange  
> thing is that when I get the results for facets. I get 2 counts. One with  
> lowercase and the other with camel case. Is there any workaround for this ?
> 
> The facet result looks like :
> 
> "facets" : {
> 
> "datatype" : {
> 
> "\_type" : "terms",
> 
> "missing" : 5,
> 
> "total" : 62,
> 
> "other" : 0,
> 
> "terms" : [ {
> 
> "term" : "sample_t_ype",
> 
> "count" : 30
> 
> }, {
> 
> "term" : "sample_T_ype",
> 
> "count" : 20
> 
> }  
> }  
> }

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/02c6e23c-b947-449d-a09d-9567a34e764b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/02c6e23c-b947-449d-a09d-9567a34e764b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 1:56am UTC](https://discuss.elastic.co/t/case-lower-and-upper-issue-with-termsfacetbuilder-result/15239/3 "2017-07-06T01:56:46Z")

</div>


