# Term facet problem

**URL:** <https://discuss.elastic.co/t/term-facet-problem/14966>\
**Category:** Elasticsearch\
**Created:** [December 20, 2013, 7:00am UTC](https://discuss.elastic.co/t/term-facet-problem/14966 "2013-12-20T07:00:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhiage](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@abhiage](https://discuss.elastic.co/u/abhiage)\
**Post date:** [December 20, 2013, 7:00am UTC](https://discuss.elastic.co/t/term-facet-problem/14966/1 "2013-12-20T07:00:29Z")

</div>

I have following data

Action : "added" Product\_ID : slr-camera-tripod  
Action : "added" Product\_ID : slr-camera-tripod

while running term facetson product\_ID it shows count like

term : slr count : 2  
term : camera count : 2  
term : tripod count : 2

which is not appropriate.

It should show like term : slr-camera-tripod count :2

How can I achieve the same?

--  
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/099ee59d-1528-4941-8813-22939313a1af%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/099ee59d-1528-4941-8813-22939313a1af%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:** ![johtani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johtani/32/44956_2.png) [@johtani](https://discuss.elastic.co/u/johtani)\
**Post date:** [December 20, 2013, 7:07am UTC](https://discuss.elastic.co/t/term-facet-problem/14966/2 "2013-12-20T07:07:59Z")

</div>

Hi,

Your “Product\_ID” field is “analyzed”.  
You change the Product\_ID field to “not\_analyzed” for faceting.

If you want to search analyzed Product\_ID field, then you should use multi\_field.

See :

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

* * *

Jun Ohtani  
[johtani@gmail.com](mailto:johtani@gmail.com)  
blog : [http://blog.johtani.info](http://blog.johtani.info)  
twitter : [http://twitter.com/johtani](http://twitter.com/johtani)

2013/12/20 16:00、abhi patel [abhiage@gmail.com](mailto:abhiage@gmail.com) のメール：

> I have following data
> 
> Action : "added" Product\_ID : slr-camera-tripod  
> Action : "added" Product\_ID : slr-camera-tripod
> 
> while running term facetson product\_ID it shows count like
> 
> term : slr count : 2  
> term : camera count : 2  
> term : tripod count : 2
> 
> which is not appropriate.
> 
> It should show like term : slr-camera-tripod count :2
> 
> How can I achieve the same?
> 
> --  
> 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/099ee59d-1528-4941-8813-22939313a1af%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/099ee59d-1528-4941-8813-22939313a1af%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:** ![abhiage](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@abhiage](https://discuss.elastic.co/u/abhiage)\
**Post date:** [December 23, 2013, 8:27am UTC](https://discuss.elastic.co/t/term-facet-problem/14966/3 "2013-12-23T08:27:24Z")

</div>

Thank you.It worked

On Friday, December 20, 2013 12:37:59 PM UTC+5:30, Jun Ohtani wrote:

> Hi,
> 
> Your “Product\_ID” field is “analyzed”.  
> You change the Product\_ID field to “not\_analyzed” for faceting.
> 
> If you want to search analyzed Product\_ID field, then you should use  
> multi\_field.
> 
> See :
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-multi-field-type.html)
> 
> * * *
> 
> Jun Ohtani  
> [joh...@gmail.com](mailto:joh...@gmail.com) \<javascript:\>  
> blog : [http://blog.johtani.info](http://blog.johtani.info)  
> twitter : [http://twitter.com/johtani](http://twitter.com/johtani)
> 
> 2013/12/20 16:00、abhi patel \<[abh...@gmail.com](mailto:abh...@gmail.com) \<javascript:\>\> のメール：
> 
> > I have following data
> > 
> > Action : "added" Product\_ID : slr-camera-tripod  
> > Action : "added" Product\_ID : slr-camera-tripod
> > 
> > while running term facetson product\_ID it shows count like
> > 
> > term : slr count : 2  
> > term : camera count : 2  
> > term : tripod count : 2
> > 
> > which is not appropriate.
> > 
> > It should show like term : slr-camera-tripod count :2
> > 
> > How can I achieve the same?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/099ee59d-1528-4941-8813-22939313a1af%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/099ee59d-1528-4941-8813-22939313a1af%40googlegroups.com).
> 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/f2e55077-85d1-421d-9a77-07a9383b525f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f2e55077-85d1-421d-9a77-07a9383b525f%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:59am UTC](https://discuss.elastic.co/t/term-facet-problem/14966/4 "2017-07-06T01:59:39Z")

</div>


