# Index data in multiple message field

**URL:** <https://discuss.elastic.co/t/index-data-in-multiple-message-field/85416>\
**Category:** Elasticsearch\
**Created:** [May 11, 2017, 2:12pm UTC](https://discuss.elastic.co/t/index-data-in-multiple-message-field/85416 "2017-05-11T14:12:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amitkumar](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@amitkumar](https://discuss.elastic.co/u/amitkumar)\
**Post date:** [May 11, 2017, 2:12pm UTC](https://discuss.elastic.co/t/index-data-in-multiple-message-field/85416/1 "2017-05-11T14:12:03Z")

</div>

for one index creating multiple \_source and message field i want all my data in single message field.how it is possible please let me know i am not too much aware about 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:** [May 11, 2017, 3:00pm UTC](https://discuss.elastic.co/t/index-data-in-multiple-message-field/85416/2 "2017-05-11T15:00:29Z")

</div>

I don't understand. May be you can send a JSON example of what you want to send to elasticsearch?

---

<div class="post-metadata">

**Author:** ![amitkumar](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@amitkumar](https://discuss.elastic.co/u/amitkumar)\
**Post date:** [May 12, 2017, 6:25am UTC](https://discuss.elastic.co/t/index-data-in-multiple-message-field/85416/3 "2017-05-12T06:25:46Z")

</div>

Actually i have send html file using logstash to elasticsearch and created an index.but when i tried to see data of html file it is not coming in single hits.it is coming in multiple hits object.  
ex.

{  
"took":13,  
"timed\_out":false,  
"\_shards":{  
"total":5,  
"successful":5,  
"failed":0  
},  
"hits":{  
"total":11,  
"max\_score":1.0,  
"hits":[  
{  
"\_index":"htm\_bulkdrugs\_test\_10\_may",  
"\_type":"logs",  
"\_id":"AVv2\_FzIc-uW8AU86PV6",  
"\_score":1.0,  
"\_source":{  
"path":"/root/logstash-5.1.1/html/Bulk drugs/767\_27\_9999900009931.htm",  
"@timestamp":"2017-05-11T10:10:41.815Z",  
"@version":"1",  
"host":"coaltion-docker",  
"message":"\<DIV ID="9"\>\<H2 style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; color: #b3453a; text-align: left; font-style: italic; margin-bottom:-13px; word-wrap: break-word"\>Significant investments required to cater to regulated markets\r",  
"tags":[  
]  
}  
},  
{  
"\_index":"htm\_bulkdrugs\_test\_10\_may",  
"\_type":"logs",  
"\_id":"AVv2\_FzIc-uW8AU86PV8",  
"\_score":1.0,  
"\_source":{  
"path":"/root/logstash-5.1.1/html/Bulk drugs/767\_27\_9999900009931.htm",  
"@timestamp":"2017-05-11T10:10:41.816Z",  
"@version":"1",  
"host":"coaltion-docker",  
"message":"\<DIV ID="11"\>\<P style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; color: #4d4d4d; letter-spacing: normal; text-align: justify; word-spacing: normal; line-height: 19px; word-wrap: break-word"\>

\r",  
"tags":[  
]  
}  
},  
{  
"\_index":"htm\_bulkdrugs\_test\_10\_may",  
"\_type":"logs",  
"\_id":"AVv2\_FzIc-uW8AU86PV0",  
"\_score":1.0,  
"\_source":{  
"path":"/root/logstash-5.1.1/html/Bulk drugs/767\_27\_9999900009931.htm",  
"@timestamp":"2017-05-11T10:10:41.812Z",  
"@version":"1",  
"host":"coaltion-docker",  
"message":"\<DIV ID="3"\>\<H2 style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; color: #b3453a; text-align: left; font-style: italic; margin-bottom:-13px; word-wrap: break-word"\>Huge export opportunity in regulated markets \r",  
"tags":[  
]  
}  
}  
}  
]  
}

}

But I want this in single hit and message field.because how should i show this content on web page.

I am uploaded a file which i wanna show on web page using elasticsearch.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/c/f/cfb6b04e058ffdc01f033fa6c3925a839f0d68bf.PNG)

---

<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:** [June 9, 2017, 6:35am UTC](https://discuss.elastic.co/t/index-data-in-multiple-message-field/85416/4 "2017-06-09T06:35:10Z")

</div>

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