# Empty response when search through too many indices

**URL:** <https://discuss.elastic.co/t/empty-response-when-search-through-too-many-indices/181519>\
**Category:** Elasticsearch\
**Created:** [May 17, 2019, 6:45am UTC](https://discuss.elastic.co/t/empty-response-when-search-through-too-many-indices/181519 "2019-05-17T06:45:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dmitriy\_Bashkalin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmitriy_bashkalin/32/46359_2.png) [@Dmitriy\_Bashkalin](https://discuss.elastic.co/u/Dmitriy_Bashkalin)\
**Post date:** [May 17, 2019, 6:45am UTC](https://discuss.elastic.co/t/empty-response-when-search-through-too-many-indices/181519/1 "2019-05-17T06:45:51Z")

</div>

Hello!  
My situation is:

- Elasticsearch 1.7.3 (didn't migrate to new version cause of complexity of app modifications but it's already planned)
- Much indices on different nodes (through tribe node)
- Each index name has structure like `index_type_prefilter1_prefilter2`
- `prefilter2` can be made on level of objects properties while `prefilter1` can't

I need to search objects that satisfy several conditions like:  
all objects which are `prefilter_1` in [x1,x2] and `prefilter\_2 in [y1,y2,y3]  
I don't want to search through all indices (there are many of them, so dropping most will greatly affect the speed) so I prepared list of indices:

```auto
    [
        "type_x1_y1", "type_x1_y2", "type_x1_y3",
        "type_x2_y1", "type_x2_y2", "type_x2_y3",
    ]

```

So the problem is when I try to execute request to all that indices (aprox. 200) I got "curl: (52) Empty reply from server" and in my opinion the problem is exactly in indices count in request cause the same request with less indices returned correct response.

```auto
 curl -XPOST 'http://127.0.0.1:9200/ **indices_list** /objects/_search?ignore_unavailable=true' -d '{"query":{"bool":{"must":{"term":{"79":"300"}}}},"size":"10"}'`

```

I can't check this situation on last version of elasticsearch.  
It'll be great if I can use regex in indices (I know about '\*' and '-') smth like `type_[x1,x2]_[y1,y2,y3]`.

I see few solutions to overcome this:

1. Decrease indices count with mask like `type_x1_*`,`type_x2_*` and filter by second property in request, but where is slightly possibility that someday properties count became too big.
2. Divide request into several by indices and then merge the responses.

Do anyone know about this problem? Maybe there are some quantity limits, request length or something else? Thx.

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [May 17, 2019, 9:03pm UTC](https://discuss.elastic.co/t/empty-response-when-search-through-too-many-indices/181519/2 "2019-05-17T21:03:50Z")

</div>

Do you see any errors in the elasticsearch log files?

---

<div class="post-metadata">

**Author:** ![Dmitriy\_Bashkalin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmitriy_bashkalin/32/46359_2.png) [@Dmitriy\_Bashkalin](https://discuss.elastic.co/u/Dmitriy_Bashkalin)\
**Post date:** [May 20, 2019, 4:42am UTC](https://discuss.elastic.co/t/empty-response-when-search-through-too-many-indices/181519/3 "2019-05-20T04:42:40Z")

</div>

Yes, sorry about that forgot to attach them:  
`[WARN][http.netty] [Mother Earth] Caught exception while handling client http traffic, closing connection [id: 0x1433e26c, /127.0.0.1:46573 => /127.0.0.1:9200] java.lang.IllegalArgumentException: invalid version format:indices_list/OBJECTS/_SEARCH?IGNORE_UNAVAILABLE=TRUE HTTP/1.1`

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [May 20, 2019, 5:22pm UTC](https://discuss.elastic.co/t/empty-response-when-search-through-too-many-indices/181519/4 "2019-05-20T17:22:21Z")

</div>

Which client are you using and what version of the client? Also, 1.7.3 is not even obsolete it's basically dangerous software to run at the moment.

---

<div class="post-metadata">

**Author:** ![Dmitriy\_Bashkalin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmitriy_bashkalin/32/46359_2.png) [@Dmitriy\_Bashkalin](https://discuss.elastic.co/u/Dmitriy_Bashkalin)\
**Post date:** [May 21, 2019, 5:58am UTC](https://discuss.elastic.co/t/empty-response-when-search-through-too-many-indices/181519/5 "2019-05-21T05:58:36Z")

</div>

If you mean which client I use in app they are '[elasticsearch.Net](http://elasticsearch.Net)' and 'Nest'.  
I think that the problem isn't on the client side, CentOS 'curl' tool response with 'empty responce' and nest return something like 'connection closed by remote...'

> Also, 1.7.3 is not even obsolete it's basically dangerous software to run at the moment.

I know that there is elasticsearch 7.0 already, but its too difficult to migrate to new version now.

Could you explain why it's dangerous to use? (it'll be great if you provide some links, if not i'll try to find out it myself)

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [May 21, 2019, 12:01pm UTC](https://discuss.elastic.co/t/empty-response-when-search-through-too-many-indices/181519/6 "2019-05-21T12:01:56Z")

</div>

How does the curl request look like?

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [May 23, 2019, 2:05am UTC](https://discuss.elastic.co/t/empty-response-when-search-through-too-many-indices/181519/7 "2019-05-23T02:05:57Z")

</div>

> [@Dmitriy\_Bashkalin](#):
>
> If you mean which client I use in app they are '[elasticsearch.Net](http://elasticsearch.Net)' and 'Nest'.

Be sure to use only the 1.x versions of these clients with Elasticsearch 1.7.3 - later client versions are not compatible. Do note however that similar to Elasticsearch 1.7.3, Nest and Elasticsearch 1.x are not longer supported.

---

<div class="post-metadata">

**Author:** ![Dmitriy\_Bashkalin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmitriy_bashkalin/32/46359_2.png) [@Dmitriy\_Bashkalin](https://discuss.elastic.co/u/Dmitriy_Bashkalin)\
**Post date:** [May 23, 2019, 6:31am UTC](https://discuss.elastic.co/t/empty-response-when-search-through-too-many-indices/181519/8 "2019-05-23T06:31:33Z")

</div>

Communication between clients ([elasticsearch.net](http://elasticsearch.net) & nest) and elasticsearch cluster already works long enough and I don't have any major problems with it. For now I had to start optimizing the query and it doesn't work nor through clients nor through simple 'POST' (curl was mentioned upper, I only changes indices to '\*\*indices\_list\*\*' due to save space in post)

---

<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:** [June 20, 2019, 6:31am UTC](https://discuss.elastic.co/t/empty-response-when-search-through-too-many-indices/181519/9 "2019-06-20T06:31:33Z")

</div>

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