# Creating Tags at Insertion in ES

**URL:** <https://discuss.elastic.co/t/creating-tags-at-insertion-in-es/22004>\
**Category:** Elasticsearch\
**Created:** [February 5, 2015, 11:52pm UTC](https://discuss.elastic.co/t/creating-tags-at-insertion-in-es/22004 "2015-02-05T23:52:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ap1](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@Ap1](https://discuss.elastic.co/u/Ap1)\
**Post date:** [February 5, 2015, 11:52pm UTC](https://discuss.elastic.co/t/creating-tags-at-insertion-in-es/22004/1 "2015-02-05T23:52:18Z")

</div>

I am trying to create a Tagging mechanism in Elastic search that checks for  
the text in the document and if the text if found then it tags the document  
with the corresponding text\_id

Eg. Tagging for Company names, text = "Google Inc", text\_id = "GOOG\_123"

If a document has the text "Google Inc", then tag it with the id =  
"GOOG\_123".

A. Insertion ?  
- Is there a way in Elastic Search to achieve this at the time of  
Insertion ?  
- If not, is there a way to tweak the Java code in Lucene to achieve  
this ?

B. Post processing  
- If it is not possible to do at insertion, how can we better achieve  
this with post processing ? Running Fuzzy or Term search ?

Thanks,  
Amay

--  
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/eb6eb29a-b3e4-4604-bf5c-e9d68b519599%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eb6eb29a-b3e4-4604-bf5c-e9d68b519599%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [February 6, 2015, 6:08am UTC](https://discuss.elastic.co/t/creating-tags-at-insertion-in-es/22004/2 "2015-02-06T06:08:01Z")

</div>

IMO this is document enrichment. You should do that on your side before sending to elasticsearch.  
You can use percolator to do some classification of your docs.

That said, if your script is super simple, you could give a look at [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-transform.html#mapping-transform)

My 2 cents.

David

> Le 6 févr. 2015 à 00:52, Ap [usc90909@gmail.com](mailto:usc90909@gmail.com) a écrit :
> 
> I am trying to create a Tagging mechanism in Elastic search that checks for the text in the document and if the text if found then it tags the document with the corresponding text\_id
> 
> Eg. Tagging for Company names, text = "Google Inc", text\_id = "GOOG\_123"
> 
> If a document has the text "Google Inc", then tag it with the id = "GOOG\_123".
> 
> A. Insertion ?  
> - Is there a way in Elastic Search to achieve this at the time of Insertion ?  
> - If not, is there a way to tweak the Java code in Lucene to achieve this ?
> 
> B. Post processing  
> - If it is not possible to do at insertion, how can we better achieve this with post processing ? Running Fuzzy or Term search ?
> 
> ## Thanks, Amay
> 
> 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/eb6eb29a-b3e4-4604-bf5c-e9d68b519599%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eb6eb29a-b3e4-4604-bf5c-e9d68b519599%40googlegroups.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/92552EC9-CBCE-4BEC-A6BA-BC09D0811A4B%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/92552EC9-CBCE-4BEC-A6BA-BC09D0811A4B%40pilato.fr).  
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, 12:34am UTC](https://discuss.elastic.co/t/creating-tags-at-insertion-in-es/22004/3 "2017-07-06T00:34:33Z")

</div>


