# ElasticSearch 5.5 returns 0 hits under high concurrency conditions

**URL:** <https://discuss.elastic.co/t/elasticsearch-5-5-returns-0-hits-under-high-concurrency-conditions/127127>\
**Category:** Elasticsearch\
**Created:** [April 6, 2018, 5:54pm UTC](https://discuss.elastic.co/t/elasticsearch-5-5-returns-0-hits-under-high-concurrency-conditions/127127 "2018-04-06T17:54:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![trangvenn](https://avatars.discourse-cdn.com/v4/letter/t/9d8465/32.png) [@trangvenn](https://discuss.elastic.co/u/trangvenn)\
**Post date:** [April 6, 2018, 5:54pm UTC](https://discuss.elastic.co/t/elasticsearch-5-5-returns-0-hits-under-high-concurrency-conditions/127127/1 "2018-04-06T17:54:34Z")

</div>

HI,

Under high concurrency conditions on a Spark EMR cluster, elasticsearch is returning 0 hits for a query that would succeed otherwise. The query we are using involves geospatial joins across pre-indexed geoshapes.  
We retry the requests when encountering this condition and the retries sometimes work, sometimes not.

I am not understanding why ES would return 0 results vs an http response that can be used to retry the requests. Also why do the results different for the same query?

we are running ES 5.5 via the AWS Elastic Service with this configuation:

Cluster size:  
4 i3.2xlarge.elasticsearch worker nodes  
2 shards/index  
Index size: ~50-60GB primary

Here is a sample query that runs into this issue:  
{"query":{  
"bool" : {  
"must" : [  
{  
"constant\_score" : {  
"filter" : {  
"bool" : {  
"should" : [  
{  
"geo\_shape" : {  
"start\_loc" : {  
"indexed\_shape" : {  
"id" : "3f712a7c-7d5f-4f16-87c6-3a673ef0e52d",  
"type" : "zone",  
"index" : "zones\_v1",  
"path" : "geometry"  
},  
"relation" : "intersects"  
},  
"ignore\_unmapped" : false,  
"boost" : 1.0  
}  
},  
{  
"geo\_shape" : {  
"end\_loc" : {  
"indexed\_shape" : {  
"id" : "3f712a7c-7d5f-4f16-87c6-3a673ef0e52d",  
"type" : "zone",  
"index" : "zones\_v1",  
"path" : "geometry"  
},  
"relation" : "intersects"  
},  
"ignore\_unmapped" : false,  
"boost" : 1.0  
}  
},  
{  
"geo\_shape" : {  
"start\_loc" : {  
"indexed\_shape" : {  
"id" : "770b8e13-6360-43e1-848f-806707370b89",  
"type" : "zone",  
"index" : "zones\_v1",  
"path" : "geometry"  
},  
"relation" : "intersects"  
},  
"ignore\_unmapped" : false,  
"boost" : 1.0  
}  
},  
{  
"geo\_shape" : {  
"end\_loc" : {  
"indexed\_shape" : {  
"id" : "770b8e13-6360-43e1-848f-806707370b89",  
"type" : "zone",  
"index" : "zones\_v1",  
"path" : "geometry"  
},  
"relation" : "intersects"  
},  
"ignore\_unmapped" : false,  
"boost" : 1.0  
}  
},  
{  
"geo\_shape" : {  
"start\_loc" : {  
"indexed\_shape" : {  
"id" : "94fe54a0-389d-4a1f-8382-6a1d5b22705f",  
"type" : "zone",  
"index" : "zones\_v1",  
"path" : "geometry"  
},  
"relation" : "intersects"  
},  
"ignore\_unmapped" : false,  
"boost" : 1.0  
}  
},  
{  
"geo\_shape" : {  
"end\_loc" : {  
"indexed\_shape" : {  
"id" : "94fe54a0-389d-4a1f-8382-6a1d5b22705f",  
"type" : "zone",  
"index" : "zones\_v1",  
"path" : "geometry"  
},  
"relation" : "intersects"  
},  
"ignore\_unmapped" : false,  
"boost" : 1.0  
}  
},  
{  
"geo\_shape" : {  
"start\_loc" : {  
"indexed\_shape" : {  
"id" : "e4baf91f-7258-4709-97d0-ef15afb0a27a",  
"type" : "zone",  
"index" : "zones\_v1",  
"path" : "geometry"  
},  
"relation" : "intersects"  
},  
"ignore\_unmapped" : false,  
"boost" : 1.0  
}  
},  
{  
"geo\_shape" : {  
"end\_loc" : {  
"indexed\_shape" : {  
"id" : "e4baf91f-7258-4709-97d0-ef15afb0a27a",  
"type" : "zone",  
"index" : "zones\_v1",  
"path" : "geometry"  
},  
"relation" : "intersects"  
},  
"ignore\_unmapped" : false,  
"boost" : 1.0  
}  
}  
],  
"disable\_coord" : false,  
"adjust\_pure\_negative" : true,  
"boost" : 1.0,  
"\_name" : "D"  
}  
},  
"boost" : 1.0  
}  
},  
{  
"constant\_score" : {  
"filter" : {  
"bool" : {  
"must" : [  
{  
"range" : {  
"startts" : {  
"from" : "2018-04-01T04:00:00.000Z",  
"to" : "2018-04-01T08:00:00.000Z",  
"include\_lower" : true,  
"include\_upper" : false,  
"boost" : 1.0  
}  
}  
},  
{  
"range" : {  
"endts" : {  
"from" : null,  
"to" : "2018-04-03T00:00:00.000Z",  
"include\_lower" : true,  
"include\_upper" : false,  
"boost" : 1.0  
}  
}  
}  
],  
"disable\_coord" : false,  
"adjust\_pure\_negative" : true,  
"boost" : 1.0  
}  
},  
"boost" : 1.0  
}  
}  
],  
"disable\_coord" : false,  
"adjust\_pure\_negative" : true,  
"boost" : 1.0  
}  
},"sort": [{"trip\_id": {"order": "asc"}}]}

Thanks  
Trang

---

<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:** [April 9, 2018, 8:07am UTC](https://discuss.elastic.co/t/elasticsearch-5-5-returns-0-hits-under-high-concurrency-conditions/127127/2 "2018-04-09T08:07:34Z")

</div>

Just a super wild guess. Do you have rejections in your thread pool counters for the `get` thread pool?

You can check with

```auto
GET _nodes/stats/thread_pool?filter_path=**.get

```

---

<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 7, 2018, 8:08am UTC](https://discuss.elastic.co/t/elasticsearch-5-5-returns-0-hits-under-high-concurrency-conditions/127127/3 "2018-05-07T08:08:01Z")

</div>

Closed on May 7, 2018, 8:08am UTC

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