# Order of operations wrt highlight and a script

**URL:** <https://discuss.elastic.co/t/order-of-operations-wrt-highlight-and-a-script/42507>\
**Category:** Elasticsearch\
**Created:** [February 23, 2016, 3:03pm UTC](https://discuss.elastic.co/t/order-of-operations-wrt-highlight-and-a-script/42507 "2016-02-23T15:03:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![drs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drs/32/8001_2.png) [@drs](https://discuss.elastic.co/u/drs)\
**Post date:** [February 23, 2016, 3:03pm UTC](https://discuss.elastic.co/t/order-of-operations-wrt-highlight-and-a-script/42507/1 "2016-02-23T15:03:35Z")

</div>

I'm starting down the road of creating an ES script to postprocess query results before sending them to the client. However, I also use highlighting on these queries and I would like the highlighting to be applied to the field created by my script.

What is the order that these processes are run? Can highlighting be applied to a field created by a script?

---

<div class="post-metadata">

**Author:** ![drs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drs/32/8001_2.png) [@drs](https://discuss.elastic.co/u/drs)\
**Post date:** [February 24, 2016, 3:04am UTC](https://discuss.elastic.co/t/order-of-operations-wrt-highlight-and-a-script/42507/2 "2016-02-24T03:04:44Z")

</div>

Nevermind. It looks like this is not supported: [https://github.com/elastic/elasticsearch/issues/9890](https://github.com/elastic/elasticsearch/issues/9890)

---

<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 5, 2017, 11:14pm UTC](https://discuss.elastic.co/t/order-of-operations-wrt-highlight-and-a-script/42507/3 "2017-07-05T23:14:03Z")

</div>


