# Store Text Content of PDF in elastic search

**URL:** <https://discuss.elastic.co/t/store-text-content-of-pdf-in-elastic-search/338924>\
**Category:** Elasticsearch\
**Created:** [July 21, 2023, 7:10am UTC](https://discuss.elastic.co/t/store-text-content-of-pdf-in-elastic-search/338924 "2023-07-21T07:10:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![a.nguyentuan](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@a.nguyentuan](https://discuss.elastic.co/u/a.nguyentuan)\
**Post date:** [July 22, 2023, 12:34am UTC](https://discuss.elastic.co/t/store-text-content-of-pdf-in-elastic-search/338924/2 "2023-07-22T00:34:30Z")

</div>

I have research around and Seem like ES is already compressed stored field according to this topic [Large string fields - Elastic Stack / Elasticsearch - Discuss the Elastic Stack](https://discuss.elastic.co/t/large-string-fields/71818)

There is also a settings to compress it even more  
[Store compression in Lucene and Elasticsearch | Elastic Blog](https://www.elastic.co/jp/blog/store-compression-in-lucene-and-elasticsearch)

```auto
curl -XPUT ‘localhost:9200/my_index’ -d ‘{
  “settings”: {
    “index.codec”: “best_compression”
  }
}’

```

Is this setting suitable for our storage optimization if we store millions of document content?

---

_[View the full topic](https://discuss.elastic.co/t/store-text-content-of-pdf-in-elastic-search/338924)._
