# The problem that the query thrown into the elastic sometimes responds and sometimes does not

**URL:** <https://discuss.elastic.co/t/the-problem-that-the-query-thrown-into-the-elastic-sometimes-responds-and-sometimes-does-not/306463>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [June 6, 2022, 2:05pm UTC](https://discuss.elastic.co/t/the-problem-that-the-query-thrown-into-the-elastic-sometimes-responds-and-sometimes-does-not/306463 "2022-06-06T14:05:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Busra\_Duygu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/busra_duygu/32/90462_2.png) [@Busra\_Duygu](https://discuss.elastic.co/u/Busra_Duygu)\
**Post date:** [June 6, 2022, 2:05pm UTC](https://discuss.elastic.co/t/the-problem-that-the-query-thrown-into-the-elastic-sometimes-responds-and-sometimes-does-not/306463/1 "2022-06-06T14:05:17Z")

</div>

Hello friends, I am facing a problem. I am throwing a query with no error in Elasticsearch. For example, I want it to fetch about 10 thousand or 20 thousand documents, sorted by date and fulfilling some conditions. I'm doing this query on the c# side using the Nest library. Elasticsearch query results sometimes bring documents, sometimes do not. If the query is incorrect, it does not return anything and returns me an error message, but no error message is returned, only count = 0. I think this issue may be server related. I would be very happy if anyone has any ideas to share with me....

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 6, 2022, 11:45pm UTC](https://discuss.elastic.co/t/the-problem-that-the-query-thrown-into-the-elastic-sometimes-responds-and-sometimes-does-not/306463/2 "2022-06-06T23:45:52Z")

</div>

It'd be useful if you shared your code, including the query, and the responses you are getting.

---

<div class="post-metadata">

**Author:** ![Busra\_Duygu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/busra_duygu/32/90462_2.png) [@Busra\_Duygu](https://discuss.elastic.co/u/Busra_Duygu)\
**Post date:** [June 7, 2022, 6:02am UTC](https://discuss.elastic.co/t/the-problem-that-the-query-thrown-into-the-elastic-sometimes-responds-and-sometimes-does-not/306463/3 "2022-06-07T06:02:26Z")

</div>

For example, when I want to pull the data in the from size range with Ascending sorted according to id.

```auto
var result = elasticClient.Search<MyModel>(s => s.Index("my_index_name")
                                      .From(0)
                                      .Size(25000)
                                      .Query(q => q.MatchAll())
                                      .Sort(srt => srt.Ascending("_id"))
                                      ).Hits.ToList();

```

![image](https://us1.discourse-cdn.com/elastic/original/3X/c/6/c62fa25b59cde7ec26860f0ef8805c1216a0d612.png)  
The result is like this. Could there be a timeout?

---

<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, 2022, 6:02am UTC](https://discuss.elastic.co/t/the-problem-that-the-query-thrown-into-the-elastic-sometimes-responds-and-sometimes-does-not/306463/4 "2022-07-05T06:02:51Z")

</div>

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