# Indexing data with comment

**URL:** <https://discuss.elastic.co/t/indexing-data-with-comment/17123>\
**Category:** Elasticsearch\
**Created:** [April 22, 2014, 9:20am UTC](https://discuss.elastic.co/t/indexing-data-with-comment/17123 "2014-04-22T09:20:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [April 22, 2014, 9:20am UTC](https://discuss.elastic.co/t/indexing-data-with-comment/17123/1 "2014-04-22T09:20:23Z")

</div>

Is there any way in ES to index the data with comment(comment part is to be avoided from indexing ). By this I mean to say that if i have data like this:

**"TechCrunch is a group-edited blog that profiles the companies, products and events defining and transforming creative LinkedIn profiles appears to be over. _//this is comment//_ "**

So while indexing the data i want ES to index the data but ignore the content which are enclosed in _ **//this is comment//** _ that is nothing but to ignore some text which has been given as comment.

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [April 22, 2014, 9:39am UTC](https://discuss.elastic.co/t/indexing-data-with-comment/17123/2 "2014-04-22T09:39:49Z")

</div>

Yes, you can add comments. They will appear in \_source.

curl -XPUT '0:9200/test/doc/1' -d '{ "Hello" : "World" /\* comment \*/ }'

curl '0:9200/test/doc/1'  
{"\_index":"test","\_type":"doc","\_id":"1","\_version":1,"found":true,  
"\_source" : { "Hello" : "World" /\* comment \*/ }}

There is also the \_meta tag

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

for storing additional information in the mapping e.g. for driving your  
custom document content codecs.

Jörg

On Tue, Apr 22, 2014 at 11:20 AM, Prashant Agrawal \<  
[prashant.agrawal@paladion.net](mailto:prashant.agrawal@paladion.net)\> wrote:

> Is there any way in ES to index the data with comment(comment part is to be  
> avoided from indexing ). By this I mean to say that if i have data like  
> this  
> _"TechCrunch is a group-edited blog that profiles the companies, products  
> and events defining and transforming creative LinkedIn profiles appears to  
> be over. / //this is comment// /"_
> 
> So while indexing the data i want ES to index the data but ignore the  
> content which are enclosed in /_//this is comment//_/ that is nothing but  
> to  
> ignore some text which has been given as comment.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Indexing-data-with-comment-tp4054550.html](http://elasticsearch-users.115913.n3.nabble.com/Indexing-data-with-comment-tp4054550.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/1398158423440-4054550.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1398158423440-4054550.post%40n3.nabble.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHqXf1a1dh63%2B\_evyOUuHV\_4LCvvHE%2BE%3DKd2U6gRo5RYA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHqXf1a1dh63%2B_evyOUuHV_4LCvvHE%2BE%3DKd2U6gRo5RYA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:34am UTC](https://discuss.elastic.co/t/indexing-data-with-comment/17123/3 "2017-07-06T01:34:23Z")

</div>


