# \[Elastic search v6.2\] What is the way to replace a field value from another value in search query itself

**URL:** <https://discuss.elastic.co/t/elastic-search-v6-2-what-is-the-way-to-replace-a-field-value-from-another-value-in-search-query-itself/178577>\
**Category:** Elasticsearch\
**Created:** [April 26, 2019, 7:35am UTC](https://discuss.elastic.co/t/elastic-search-v6-2-what-is-the-way-to-replace-a-field-value-from-another-value-in-search-query-itself/178577 "2019-04-26T07:35:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shobhit\_Jain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shobhit_jain/32/45071_2.png) [@Shobhit\_Jain](https://discuss.elastic.co/u/Shobhit_Jain)\
**Post date:** [April 26, 2019, 7:35am UTC](https://discuss.elastic.co/t/elastic-search-v6-2-what-is-the-way-to-replace-a-field-value-from-another-value-in-search-query-itself/178577/1 "2019-04-26T07:35:37Z")

</div>

I want to set up a preprocessor for search query field for which the specific value will be replaced from a set of values before the search query execution.

The purpose to preprocess a value from set of values is to reduce the network latency due by reducing query size.

I know ingest node provides preprocess capability before indexing but I want similar feature in search query

---

<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:** [April 26, 2019, 8:05am UTC](https://discuss.elastic.co/t/elastic-search-v6-2-what-is-the-way-to-replace-a-field-value-from-another-value-in-search-query-itself/178577/2 "2019-04-26T08:05:24Z")

</div>

If your goal is to reduce the query size, you can look at [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html)

---

<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:** [May 24, 2019, 8:17am UTC](https://discuss.elastic.co/t/elastic-search-v6-2-what-is-the-way-to-replace-a-field-value-from-another-value-in-search-query-itself/178577/3 "2019-05-24T08:17:02Z")

</div>

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