# ElasticSearch validate api overhead/latency

**URL:** <https://discuss.elastic.co/t/elasticsearch-validate-api-overhead-latency/97321>\
**Category:** Elasticsearch\
**Created:** [August 16, 2017, 10:01pm UTC](https://discuss.elastic.co/t/elasticsearch-validate-api-overhead-latency/97321 "2017-08-16T22:01:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harshit\_Joshi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshit_joshi/32/21182_2.png) [@Harshit\_Joshi](https://discuss.elastic.co/u/Harshit_Joshi)\
**Post date:** [August 16, 2017, 10:01pm UTC](https://discuss.elastic.co/t/elasticsearch-validate-api-overhead-latency/97321/1 "2017-08-16T22:01:29Z")

</div>

ElasticSearch provides an option to validate a query before executing an entire query to all the shards.

[https://www.elastic.co/guide/en/elasticsearch/reference/current/search-validate.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-validate.html)

How much is the latency overhead of validate api call?

There is no documentation regarding that.

---

<div class="post-metadata">

**Author:** ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)\
**Post date:** [August 18, 2017, 10:20am UTC](https://discuss.elastic.co/t/elasticsearch-validate-api-overhead-latency/97321/2 "2017-08-18T10:20:41Z")

</div>

I don't have any numbers for you but the overhead should be very low. Do you just want to make sure your query is ok you an also just send a search request and see if it fails?

---

<div class="post-metadata">

**Author:** ![Harshit\_Joshi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshit_joshi/32/21182_2.png) [@Harshit\_Joshi](https://discuss.elastic.co/u/Harshit_Joshi)\
**Post date:** [August 24, 2017, 5:13pm UTC](https://discuss.elastic.co/t/elasticsearch-validate-api-overhead-latency/97321/3 "2017-08-24T17:13:15Z")

</div>

That is possible yes, but executing a search query on all the shards is expensive.  
We do not have very large query as of now, but some complex query which spawns across multiple indices and multiple shards should be validated first before executing.

---

<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:** [September 21, 2017, 5:13pm UTC](https://discuss.elastic.co/t/elasticsearch-validate-api-overhead-latency/97321/4 "2017-09-21T17:13:19Z")

</div>

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