# Using facets on strings with spaces

**URL:** https://discuss.elastic.co/t/using-facets-on-strings-with-spaces/9048
**Category:** Elasticsearch
**Created:** [September 18, 2012, 1:05pm UTC](https://discuss.elastic.co/t/using-facets-on-strings-with-spaces/9048 "2012-09-18T13:05:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![klm007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/klm007/32/2718_2.png) [@klm007](https://discuss.elastic.co/u/klm007)
#### Post date: [September 18, 2012, 1:05pm UTC](https://discuss.elastic.co/t/using-facets-on-strings-with-spaces/9048/1 "2012-09-18T13:05:16Z")

</div>

I am trying to create facets of string values and it seems to return tokens  
of the strings.

The value supplier\_name name has the following values "adidas" and "reebok  
international". How can I get 2 facets rather than 3 ?

"facets" : {  
"supplier\_name" : {  
"\_type" : "terms",  
"missing" : 0,  
"total" : 2603,  
"other" : 0,  
"terms" : [ {  
"term" : "adidas",  
"count" : 1169  
}, {  
"term" : "international",  
"count" : 1169  
}, {  
"term" : "reebok",  
"count" : 265  
} ]  
}  
}

--

---

<div class="post-metadata">

### Author: ![Rafal\_Kuc\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafal_kuc_3/32/799_2.png) [@Rafal\_Kuc\_3](https://discuss.elastic.co/u/Rafal_Kuc_3)
#### Post date: [September 18, 2012, 1:10pm UTC](https://discuss.elastic.co/t/using-facets-on-strings-with-spaces/9048/2 "2012-09-18T13:10:59Z")

</div>

Hello!

Configure the field you are doing faceting on to index: not\_analyzed instead of index: analyzed.

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - Nutch - ElasticSearch_

I am trying to create facets of string values and it seems to return tokens of the strings.

The value supplier\_name name has the following values "adidas" and "reebok international". How can I get 2 facets rather than 3 ?

"facets" : {

```
"supplier_name" : {

  "_type" : "terms",

  "missing" : 0,

  "total" : 2603,

  "other" : 0,

  "terms" : [ {

    "term" : "adidas",

    "count" : 1169

  }, {

    "term" : "international",

    "count" : 1169

  }, {

    "term" : "reebok",

    "count" : 265

  } ]

}

```

}

--

---

<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:12am UTC](https://discuss.elastic.co/t/using-facets-on-strings-with-spaces/9048/3 "2017-07-06T03:12:28Z")

</div>


