# Facets apply For UTF-8 Characters?

**URL:** <https://discuss.elastic.co/t/facets-apply-for-utf-8-characters/7737>\
**Category:** Elasticsearch\
**Created:** [May 17, 2012, 6:29am UTC](https://discuss.elastic.co/t/facets-apply-for-utf-8-characters/7737 "2012-05-17T06:29:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijuitech](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@vijuitech](https://discuss.elastic.co/u/vijuitech)\
**Post date:** [May 17, 2012, 6:29am UTC](https://discuss.elastic.co/t/facets-apply-for-utf-8-characters/7737/1 "2012-05-17T06:29:18Z")

</div>

Hi,  
I am using the Term facet which is of UTF-8 Character,

datacount" : {  
"terms" : {  
"field" : "valuesource",  
"size" : 50  
},  
"facet\_filter" : {  
"and" : {  
"filters" : [ {  
"or" : {  
"filters" : [ {  
"and" : {  
"filters" : [ {  
"term" : {  
"valuesource" : "Test1"  
}  
} ]  
}  
}, {  
"and" : {  
"filters" : [ {  
"term" : {  
"valuesource" : "Test2"  
}  
} ]  
}  
}, {  
"and" : {  
"filters" : [ {  
"term" : {  
"valuesource" : "日本語"  
}  
} ]  
}  
},  
Here I couldn't get the count of the valuesource " 日本語" . How can I  
get the count of this value?  
can I get the Count for that facet Term in ES?

Cheers!

George

---

<div class="post-metadata">

**Author:** ![vijuitech](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@vijuitech](https://discuss.elastic.co/u/vijuitech)\
**Post date:** [May 18, 2012, 4:03am UTC](https://discuss.elastic.co/t/facets-apply-for-utf-8-characters/7737/2 "2012-05-18T04:03:22Z")

</div>

Hi,  
How can I get the Facets for the String which is a  
Foreign(UTF-8) Character?

Cheers!

George

On May 17, 11:29 am, George Viju [vijuit...@gmail.com](mailto:vijuit...@gmail.com) wrote:

> Hi,  
> I am using the Term facet which is of UTF-8 Character,
> 
> datacount" : {  
> "terms" : {  
> "field" : "valuesource",  
> "size" : 50  
> },  
> "facet\_filter" : {  
> "and" : {  
> "filters" : [ {  
> "or" : {  
> "filters" : [ {  
> "and" : {  
> "filters" : [ {  
> "term" : {  
> "valuesource" : "Test1"  
> }  
> } ]  
> }  
> }, {  
> "and" : {  
> "filters" : [ {  
> "term" : {  
> "valuesource" : "Test2"  
> }  
> } ]  
> }  
> }, {  
> "and" : {  
> "filters" : [ {  
> "term" : {  
> "valuesource" : "日本語"  
> }  
> } ]  
> }  
> },  
> Here I couldn't get the count of the valuesource " 日本語" . How can I  
> get the count of this value?  
> can I get the Count for that facet Term in ES?
> 
> Cheers!
> 
> George

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [May 19, 2012, 1:06am UTC](https://discuss.elastic.co/t/facets-apply-for-utf-8-characters/7737/3 "2012-05-19T01:06:33Z")

</div>

Hi George,

Maybe you can share the response you got?  
Which Analyzer is used here?

Otis

On Thursday, May 17, 2012 2:29:18 AM UTC-4, George Viju wrote:

> Hi,  
> I am using the Term facet which is of UTF-8 Character,
> 
> datacount" : {  
> "terms" : {  
> "field" : "valuesource",  
> "size" : 50  
> },  
> "facet\_filter" : {  
> "and" : {  
> "filters" : [ {  
> "or" : {  
> "filters" : [ {  
> "and" : {  
> "filters" : [ {  
> "term" : {  
> "valuesource" : "Test1"  
> }  
> } ]  
> }  
> }, {  
> "and" : {  
> "filters" : [ {  
> "term" : {  
> "valuesource" : "Test2"  
> }  
> } ]  
> }  
> }, {  
> "and" : {  
> "filters" : [ {  
> "term" : {  
> "valuesource" : "日本語"  
> }  
> } ]  
> }  
> },  
> Here I couldn't get the count of the valuesource " 日本語" . How can I  
> get the count of this value?  
> can I get the Count for that facet Term in ES?
> 
> Cheers!
> 
> George

---

<div class="post-metadata">

**Author:** ![vijuitech](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@vijuitech](https://discuss.elastic.co/u/vijuitech)\
**Post date:** [May 21, 2012, 4:39am UTC](https://discuss.elastic.co/t/facets-apply-for-utf-8-characters/7737/4 "2012-05-21T04:39:25Z")

</div>

Thanks Otis. I am using Default Analyzer. It is working fine.

Cheers!

George

On May 19, 6:06 am, Otis Gospodnetic [otis.gospodne...@gmail.com](mailto:otis.gospodne...@gmail.com)  
wrote:

> Hi George,
> 
> Maybe you can share the response you got?  
> Which Analyzer is used here?
> 
> Otis
> 
> On Thursday, May 17, 2012 2:29:18 AM UTC-4, George Viju wrote:
> 
> > Hi,  
> > I am using the Term facet which is of UTF-8 Character,
> 
> > datacount" : {  
> > "terms" : {  
> > "field" : "valuesource",  
> > "size" : 50  
> > },  
> > "facet\_filter" : {  
> > "and" : {  
> > "filters" : [ {  
> > "or" : {  
> > "filters" : [ {  
> > "and" : {  
> > "filters" : [ {  
> > "term" : {  
> > "valuesource" : "Test1"  
> > }  
> > } ]  
> > }  
> > }, {  
> > "and" : {  
> > "filters" : [ {  
> > "term" : {  
> > "valuesource" : "Test2"  
> > }  
> > } ]  
> > }  
> > }, {  
> > "and" : {  
> > "filters" : [ {  
> > "term" : {  
> > "valuesource" : "日本語"  
> > }  
> > } ]  
> > }  
> > },  
> > Here I couldn't get the count of the valuesource " 日本語" . How can I  
> > get the count of this value?  
> > can I get the Count for that facet Term in ES?
> 
> > Cheers!
> 
> > George

---

<div class="post-metadata">

**Author:** ![vijuitech](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@vijuitech](https://discuss.elastic.co/u/vijuitech)\
**Post date:** [May 21, 2012, 5:21am UTC](https://discuss.elastic.co/t/facets-apply-for-utf-8-characters/7737/5 "2012-05-21T05:21:40Z")

</div>

Thanks Otis. I am using Default analyzer.

The response I am getting is

```
"datacount" : {
  "_type" : "terms",
  "missing" : 0,
  "total" : 32,
  "other" : 0,
  "terms" : [ {
    "term" : "",
    "count" : 32
  } ]
},

```

But originally the count available is 1. It is showing 32 here.

Cheers!

George

On May 19, 6:06 am, Otis Gospodnetic [otis.gospodne...@gmail.com](mailto:otis.gospodne...@gmail.com)  
wrote:

> Hi George,
> 
> Maybe you can share the response you got?  
> Which Analyzer is used here?
> 
> Otis
> 
> On Thursday, May 17, 2012 2:29:18 AM UTC-4, George Viju wrote:
> 
> > Hi,  
> > I am using the Term facet which is of UTF-8 Character,
> 
> > datacount" : {  
> > "terms" : {  
> > "field" : "valuesource",  
> > "size" : 50  
> > },  
> > "facet\_filter" : {  
> > "and" : {  
> > "filters" : [ {  
> > "or" : {  
> > "filters" : [ {  
> > "and" : {  
> > "filters" : [ {  
> > "term" : {  
> > "valuesource" : "Test1"  
> > }  
> > } ]  
> > }  
> > }, {  
> > "and" : {  
> > "filters" : [ {  
> > "term" : {  
> > "valuesource" : "Test2"  
> > }  
> > } ]  
> > }  
> > }, {  
> > "and" : {  
> > "filters" : [ {  
> > "term" : {  
> > "valuesource" : "日本語"  
> > }  
> > } ]  
> > }  
> > },  
> > Here I couldn't get the count of the valuesource " 日本語" . How can I  
> > get the count of this value?  
> > can I get the Count for that facet Term in ES?
> 
> > Cheers!
> 
> > George

---

<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, 3:27am UTC](https://discuss.elastic.co/t/facets-apply-for-utf-8-characters/7737/6 "2017-07-06T03:27:51Z")

</div>


