# Not analyzed vs Analyzed

**URL:** <https://discuss.elastic.co/t/not-analyzed-vs-analyzed/43414>\
**Category:** Elasticsearch\
**Created:** [March 3, 2016, 4:40pm UTC](https://discuss.elastic.co/t/not-analyzed-vs-analyzed/43414 "2016-03-03T16:40:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![es1024](https://avatars.discourse-cdn.com/v4/letter/e/f9ae1b/32.png) [@es1024](https://discuss.elastic.co/u/es1024)\
**Post date:** [March 3, 2016, 4:40pm UTC](https://discuss.elastic.co/t/not-analyzed-vs-analyzed/43414/1 "2016-03-03T16:40:05Z")

</div>

I basically have data where I'm only going to do database like queries such as where car = 'mustang' (Exact queries). In some cases I might do where car like 'mustan%'

I'm going to do lots of aggregates on the data. I believe I can get away with just Term queries so my thinking is that I can just create all my fields as non-analyzed fields.

I'm just trying to figure out form a performance standpoint which would be better. I've setup one of my indexes with a field that is multi-type and I seem to be getting slightly better performance with non-analyzed. I don't know how that will scale going forward.

Just curious what the pros/cons are of non vs analyzed as it relates to me just really needing to do the "exact" type queries or wildcard queries. I do not need full text search or anything complex. NO special analysis, case sensitivity, etc... Essentially just "SQL" like queries. where a = b or where a like 'b%'

Does one perform better, take more storage, more overhead, etc....?

Thank you

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [March 3, 2016, 7:32pm UTC](https://discuss.elastic.co/t/not-analyzed-vs-analyzed/43414/2 "2016-03-03T19:32:38Z")

</div>

With Elasticsearch 2.0+, non-analyzed fields will use doc values by  
default, which will offer better performance and reduced your Java heap  
usage. The downsides is that they use more disk space and slightly  
increased indexing time. Using off-heap memory and reducing the size of the  
heap is a great improvement.

Ivan

---

<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 5, 2017, 11:11pm UTC](https://discuss.elastic.co/t/not-analyzed-vs-analyzed/43414/3 "2017-07-05T23:11:30Z")

</div>


