# Elasticsearch stores plain text

**URL:** <https://discuss.elastic.co/t/elasticsearch-stores-plain-text/257212>\
**Category:** Elasticsearch\
**Created:** [December 1, 2020, 1:52pm UTC](https://discuss.elastic.co/t/elasticsearch-stores-plain-text/257212 "2020-12-01T13:52:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![knagasri](https://avatars.discourse-cdn.com/v4/letter/k/47e85d/32.png) [@knagasri](https://discuss.elastic.co/u/knagasri)\
**Post date:** [December 1, 2020, 1:52pm UTC](https://discuss.elastic.co/t/elasticsearch-stores-plain-text/257212/1 "2020-12-01T13:52:45Z")

</div>

Did elasticsearch allows only to store data in json format? or is to possible to pass plain text to store in elasticsearch?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 1, 2020, 2:18pm UTC](https://discuss.elastic.co/t/elasticsearch-stores-plain-text/257212/2 "2020-12-01T14:18:39Z")

</div>

You need to send documents as JSON. Like:

```auto
DELETE /index
POST /index/_doc
{
  "content": "All the text you want to index here"
}

```

You can add more fields if you want.

---

<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:** [December 29, 2020, 2:19pm UTC](https://discuss.elastic.co/t/elasticsearch-stores-plain-text/257212/3 "2020-12-29T14:19:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
