# Set the value of a field to another field using elastic search processor

**URL:** <https://discuss.elastic.co/t/set-the-value-of-a-field-to-another-field-using-elastic-search-processor/93944>\
**Category:** Elasticsearch\
**Created:** [July 20, 2017, 1:05pm UTC](https://discuss.elastic.co/t/set-the-value-of-a-field-to-another-field-using-elastic-search-processor/93944 "2017-07-20T13:05:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssmishra](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@ssmishra](https://discuss.elastic.co/u/ssmishra)\
**Post date:** [July 20, 2017, 1:05pm UTC](https://discuss.elastic.co/t/set-the-value-of-a-field-to-another-field-using-elastic-search-processor/93944/1 "2017-07-20T13:05:54Z")

</div>

i am trying to set a the value of a field to another field.  
Like i have a field "date" and "name". i want the set the value of these fields to another field "log"  
I am using set processor:  
{  
"set": {  
"field": "log",  
"value": "%{date} %{name}"  
}  
}

this does not work and set s the value of "log" as "%{date} %{name}" instead of the value in "date" and "name".  
Is there a way to do this?

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [July 21, 2017, 6:48am UTC](https://discuss.elastic.co/t/set-the-value-of-a-field-to-another-field-using-elastic-search-processor/93944/2 "2017-07-21T06:48:47Z")

</div>

You're using the wrong syntax. Read this: [https://www.elastic.co/guide/en/elasticsearch/reference/5.5/accessing-data-in-pipelines.html#accessing-template-fields](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/accessing-data-in-pipelines.html#accessing-template-fields)

---

<div class="post-metadata">

**Author:** ![ssmishra](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@ssmishra](https://discuss.elastic.co/u/ssmishra)\
**Post date:** [July 26, 2017, 9:49am UTC](https://discuss.elastic.co/t/set-the-value-of-a-field-to-another-field-using-elastic-search-processor/93944/3 "2017-07-26T09:49:41Z")

</div>

Thank you very much. I missed that section of the docs.  
It works now 🙂

---

<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:** [August 23, 2017, 9:49am UTC](https://discuss.elastic.co/t/set-the-value-of-a-field-to-another-field-using-elastic-search-processor/93944/4 "2017-08-23T09:49:47Z")

</div>

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