# Accessing search size in execution context

**URL:** <https://discuss.elastic.co/t/accessing-search-size-in-execution-context/148723>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [September 15, 2018, 9:39pm UTC](https://discuss.elastic.co/t/accessing-search-size-in-execution-context/148723 "2018-09-15T21:39:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgburks](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@jgburks](https://discuss.elastic.co/u/jgburks)\
**Post date:** [September 15, 2018, 9:39pm UTC](https://discuss.elastic.co/t/accessing-search-size-in-execution-context/148723/1 "2018-09-15T21:39:22Z")

</div>

Is there any way to access the search/query size value in the execution context? So emails could include something like "showing up to {{ctx.search.request.size}} results}}".

Thanks

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 17, 2018, 7:46am UTC](https://discuss.elastic.co/t/accessing-search-size-in-execution-context/148723/2 "2018-09-17T07:46:05Z")

</div>

Hey,

no, the request data is not part of the response and thus cannot be accessed. You could hardcode that parameter in the [watch metadata](https://www.elastic.co/guide/en/elastic-stack-overview/6.4/how-watcher-works.html) though.

Hope this helps.

--Alex

---

<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:** [October 15, 2018, 7:46am UTC](https://discuss.elastic.co/t/accessing-search-size-in-execution-context/148723/3 "2018-10-15T07:46:12Z")

</div>

Closed on October 15, 2018, 7:46am UTC

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