# Getting distinct field values without using Keyword analyzer

**URL:** <https://discuss.elastic.co/t/getting-distinct-field-values-without-using-keyword-analyzer/6761>\
**Category:** Elasticsearch\
**Created:** [February 20, 2012, 11:09pm UTC](https://discuss.elastic.co/t/getting-distinct-field-values-without-using-keyword-analyzer/6761 "2012-02-20T23:09:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SANDPATH7](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@SANDPATH7](https://discuss.elastic.co/u/SANDPATH7)\
**Post date:** [February 20, 2012, 11:09pm UTC](https://discuss.elastic.co/t/getting-distinct-field-values-without-using-keyword-analyzer/6761/1 "2012-02-20T23:09:21Z")

</div>

Hi,

I am trying to get distinct field values with the count, so i am using facets. The field values were getting truncated based on special characters so i used Keyword Analyzer. Now the problem is that my search is failing. For search, i have to put the exact field value.  
Is there a way so i can do both the things:  
1: Use Facets to get all the distinct field values without being truncated and  
2: I do not have to put the exact string in the value to query.

Thanks,

---

<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:38am UTC](https://discuss.elastic.co/t/getting-distinct-field-values-without-using-keyword-analyzer/6761/2 "2017-07-06T03:38:44Z")

</div>


