# Pagination return 0 value

**URL:** <https://discuss.elastic.co/t/pagination-return-0-value/20764>\
**Category:** Elasticsearch\
**Created:** [November 15, 2014, 5:49pm UTC](https://discuss.elastic.co/t/pagination-return-0-value/20764 "2014-11-15T17:49:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arnaud\_Coutant](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Arnaud\_Coutant](https://discuss.elastic.co/u/Arnaud_Coutant)\
**Post date:** [November 15, 2014, 5:49pm UTC](https://discuss.elastic.co/t/pagination-return-0-value/20764/1 "2014-11-15T17:49:46Z")

</div>

Dear Community Members,

I use this request:  
'{  
"size": 10, from: 0,  
"query": {

```
                "filtered" : {
                    "query" : {
                        "match_all" : {}
                     },
                     "filter" : {
                        "geo_distance" : {
                            "distance" : 10km",
                            "location" : [10,10]
                        }
                    }
                }
            }
        }'

```

This request is built dynamically in order to paginate the result.

The first call of this request works, but each other call return 0 value  
despite there are more than 10 values left. If I call again the same  
request with the exact same value, the request return also 0 value instead  
of the same value that the first one.

Exact return is "{"total\_rows":278,"rows":[]}"

Is something missing ?

Thanks a lot for your help.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/75a2b7ce-58f9-4737-bf5d-1d0f27d3d7b5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/75a2b7ce-58f9-4737-bf5d-1d0f27d3d7b5%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Arnaud\_Coutant](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Arnaud\_Coutant](https://discuss.elastic.co/u/Arnaud_Coutant)\
**Post date:** [November 15, 2014, 6:21pm UTC](https://discuss.elastic.co/t/pagination-return-0-value/20764/2 "2014-11-15T18:21:21Z")

</div>

In fact the probleme is global.

When I call both the request belox (without pagination), the first return  
result, the second "{"total\_rows":278,"rows":}"

'{  
"query": {

```
                "filtered" : {
                    "query" : {
                        "match_all" : {}
                     },
                     "filter" : {
                        "geo_distance" : {
                            "distance" : 10km",
                            "location" : [10,10]
                        }
                    }
                }
            }
        }'

```

Le samedi 15 novembre 2014 18:49:46 UTC+1, Arnaud Coutant a écrit :

> Dear Community Members,
> 
> I use this request:  
> '{  
> "size": 10, from: 0,  
> "query": {
> 
> ```
> "filtered" : {
> "query" : {
> "match_all" : {}
> },
> "filter" : {
> "geo_distance" : {
> "distance" : 10km",
> "location" : [10,10]
> }
> }
> }
> }
> }'
> 
> ```
> 
> This request is built dynamically in order to paginate the result.
> 
> The first call of this request works, but each other call return 0 value  
> despite there are more than 10 values left. If I call again the same  
> request with the exact same value, the request return also 0 value instead  
> of the same value that the first one.
> 
> Exact return is "{"total\_rows":278,"rows":}"
> 
> Is something missing ?
> 
> Thanks a lot for your help.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/20dc722e-5cd1-422d-b250-37d13495bc15%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/20dc722e-5cd1-422d-b250-37d13495bc15%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 15, 2014, 7:56pm UTC](https://discuss.elastic.co/t/pagination-return-0-value/20764/3 "2014-11-15T19:56:25Z")

</div>

Where this rows field comes from?

I know about hits but rows???

David

> Le 15 nov. 2014 à 18:49, Arnaud Coutant [arnaudco@gmail.com](mailto:arnaudco@gmail.com) a écrit :
> 
> Dear Community Members,
> 
> I use this request:  
> '{  
> "size": 10, from: 0,  
> "query": {
> 
> ```
> "filtered" : {
> "query" : {
> "match_all" : {}
> },
> "filter" : {
> "geo_distance" : {
> "distance" : 10km",
> "location" : [10,10]
> }
> }
> }
> }
> }'
> 
> ```
> 
> This request is built dynamically in order to paginate the result.
> 
> The first call of this request works, but each other call return 0 value despite there are more than 10 values left. If I call again the same request with the exact same value, the request return also 0 value instead of the same value that the first one.
> 
> Exact return is "{"total\_rows":278,"rows":}"
> 
> Is something missing ?
> 
> ## Thanks a lot for your help.
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/75a2b7ce-58f9-4737-bf5d-1d0f27d3d7b5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/75a2b7ce-58f9-4737-bf5d-1d0f27d3d7b5%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/C7C56C22-B951-451E-AEF9-3CCE89DD7347%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/C7C56C22-B951-451E-AEF9-3CCE89DD7347%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:49am UTC](https://discuss.elastic.co/t/pagination-return-0-value/20764/4 "2017-07-06T00:49:48Z")

</div>

Closed on July 6, 2017, 12:49am UTC


