# Index Size difference while using keyword and standard analyzer

**URL:** <https://discuss.elastic.co/t/index-size-difference-while-using-keyword-and-standard-analyzer/3702>\
**Category:** Elasticsearch\
**Created:** [December 27, 2010, 9:12am UTC](https://discuss.elastic.co/t/index-size-difference-while-using-keyword-and-standard-analyzer/3702 "2010-12-27T09:12:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arulkumar](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Arulkumar](https://discuss.elastic.co/u/Arulkumar)\
**Post date:** [December 27, 2010, 9:12am UTC](https://discuss.elastic.co/t/index-size-difference-while-using-keyword-and-standard-analyzer/3702/1 "2010-12-27T09:12:59Z")

</div>

Hi all,  
I am indexing a file with 20MB of memory size, While using  
standard analyzer it took memory of 87mb but for keyword analyzer it  
took memory of 84mb. Why it takes this much memory....? Which is the  
best analyzer while considering memory size.....?

---

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [December 28, 2010, 5:20pm UTC](https://discuss.elastic.co/t/index-size-difference-while-using-keyword-and-standard-analyzer/3702/2 "2010-12-28T17:20:58Z")

</div>

The analyzer chosen really should be driven from search requirements.

But to give a (non) answer to your question, it all depends on your  
data and you should test different ones out and see what works best  
for you.

For example, I think if you used a stemmer, as well, that should  
decrease size, as the overall term count would be reduced.

Regards,  
Paul

On Dec 27, 2:12 am, Arulkumar [arulkuma...@gmail.com](mailto:arulkuma...@gmail.com) wrote:

> Hi all,  
> I am indexing a file with 20MB of memory size, While using  
> standard analyzer it took memory of 87mb but for keyword analyzer it  
> took memory of 84mb. Why it takes this much memory....? Which is the  
> best analyzer while considering memory size.....?

---

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [December 28, 2010, 10:32pm UTC](https://discuss.elastic.co/t/index-size-difference-while-using-keyword-and-standard-analyzer/3702/3 "2010-12-28T22:32:00Z")

</div>

I should have also mentioned that the following index field mappings  
parameters will increase/decrease the index size. Whether or not you  
need them should be determined by your search requirements.

- term\_vector
- omit\_norms
- omit\_term\_freq\_and\_positions
- store

from this URL: [Field data types | Elasticsearch Guide [8.11] | Elastic](http://www.elasticsearch.com/docs/elasticsearch/mapping/core_types/)

And don't forget about \_source compression:  
[http://www.elasticsearch.com/docs/elasticsearch/mapping/source\_field/](http://www.elasticsearch.com/docs/elasticsearch/mapping/source_field/)

On Dec 28, 10:20 am, Paul [ppea...@gmail.com](mailto:ppea...@gmail.com) wrote:

> The analyzer chosen really should be driven from search requirements.
> 
> But to give a (non) answer to your question, it all depends on your  
> data and you should test different ones out and see what works best  
> for you.
> 
> For example, I think if you used a stemmer, as well, that should  
> decrease size, as the overall term count would be reduced.
> 
> Regards,  
> Paul
> 
> On Dec 27, 2:12 am, Arulkumar [arulkuma...@gmail.com](mailto:arulkuma...@gmail.com) wrote:
> 
> > Hi all,  
> > I am indexing a file with 20MB of memory size, While using  
> > standard analyzer it took memory of 87mb but for keyword analyzer it  
> > took memory of 84mb. Why it takes this much memory....? Which is the  
> > best analyzer while considering memory size.....?

---

<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, 4:14am UTC](https://discuss.elastic.co/t/index-size-difference-while-using-keyword-and-standard-analyzer/3702/4 "2017-07-06T04:14:45Z")

</div>

Closed on July 6, 2017, 4:14am UTC


