# Get indexed Elasticsearch document body from Logstash

**URL:** <https://discuss.elastic.co/t/get-indexed-elasticsearch-document-body-from-logstash/296865>\
**Category:** Logstash\
**Created:** [February 10, 2022, 3:47pm UTC](https://discuss.elastic.co/t/get-indexed-elasticsearch-document-body-from-logstash/296865 "2022-02-10T15:47:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NominaSumpta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nominasumpta/32/52412_2.png) [@NominaSumpta](https://discuss.elastic.co/u/NominaSumpta)\
**Post date:** [February 10, 2022, 3:47pm UTC](https://discuss.elastic.co/t/get-indexed-elasticsearch-document-body-from-logstash/296865/1 "2022-02-10T15:47:47Z")

</div>

Hi,

Is there a way to see the exact body of a document that Logstash indexed? I'm using the Elasticsearch output plugin.

Context: in our production environment, some data is output into Elasticsearch by Logstash. In Elasticsearch, the document has a multi-field (`text` and `keyword`). However, `keyword` is missing in the test. In my test, the documents that Logstash output in production are added manually; I only index the '\_source' of the document. I'd like to know the exact document that Logstash indexes to get the mapping right.

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [February 11, 2022, 3:59am UTC](https://discuss.elastic.co/t/get-indexed-elasticsearch-document-body-from-logstash/296865/2 "2022-02-11T03:59:51Z")

</div>

`_source` fields store just as the `_source` fields in the inputs to Elasticsearch.  
Elasticsearch output plugin constructs `_source` field from any fields in the events in Logstash other than metadata.

The keyword field was created by Elasticsearch according to the multi-field mappings of the target index.  
What do you want to get? Can you share sample of stdout ouput and what you want store in Elasticsearch?

```auto
output {
  stdout {}
}

```

---

<div class="post-metadata">

**Author:** ![NominaSumpta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nominasumpta/32/52412_2.png) [@NominaSumpta](https://discuss.elastic.co/u/NominaSumpta)\
**Post date:** [February 11, 2022, 8:01am UTC](https://discuss.elastic.co/t/get-indexed-elasticsearch-document-body-from-logstash/296865/3 "2022-02-11T08:01:42Z")

</div>

Turns out I do actually have the `keyword` field in the test documents. Thanks for your reply nonetheless.

---

<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:** [March 11, 2022, 8:02am UTC](https://discuss.elastic.co/t/get-indexed-elasticsearch-document-body-from-logstash/296865/4 "2022-03-11T08:02:29Z")

</div>

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