# Duplicate content returned while paginating

**URL:** https://discuss.elastic.co/t/duplicate-content-returned-while-paginating/136535
**Category:** Elasticsearch
**Created:** [June 19, 2018, 4:14pm UTC](https://discuss.elastic.co/t/duplicate-content-returned-while-paginating/136535 "2018-06-19T16:14:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![subrato](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@subrato](https://discuss.elastic.co/u/subrato)
#### Post date: [June 19, 2018, 4:14pm UTC](https://discuss.elastic.co/t/duplicate-content-returned-while-paginating/136535/1 "2018-06-19T16:14:20Z")

</div>

I have 3 data nodes and 2 master nodes. I imported all the content and am using NEST to do simple search. Here is the code for that.

```
mediaResponse = elastic.Search<Articles>(s => s
                                                           .Explain(true)
                                                           .Pretty(true)
                                                           .Human(true)
                                                           .Index(mediaIndexName)
                                                           .Type(mediaTypeName)
                                                           .From(pageNumber)
                                                           .Size(numResults)
                                                           .Query(q => q
                                                                        .Match(m => m
                                                                                     .Field(new Field("content", null)).Query(queryTxt)
                                                                              )
                                                                 )
            );

```

When I use my default values (numResults = 25, pageNumber=0) everything is fine but when I use pageNumber=1 I start seeing dupes from page 0 in page 1 result set. Anything I can do to stop this behavior?

---

<div class="post-metadata">

### Author: ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)
#### Post date: [June 22, 2018, 10:03am UTC](https://discuss.elastic.co/t/duplicate-content-returned-while-paginating/136535/2 "2018-06-22T10:03:35Z")

</div>

"From" is not a page number but a result number e.g. document number 11 in a set of results.  
Typically when you page through results you need to add "Size" to the previous "From"

---

<div class="post-metadata">

### Author: ![subrato](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@subrato](https://discuss.elastic.co/u/subrato)
#### Post date: [June 28, 2018, 2:56pm UTC](https://discuss.elastic.co/t/duplicate-content-returned-while-paginating/136535/3 "2018-06-28T14:56:04Z")

</div>

Thank you @Mark_Harwood that solved my issue

---

<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 26, 2018, 2:56pm UTC](https://discuss.elastic.co/t/duplicate-content-returned-while-paginating/136535/4 "2018-07-26T14:56:07Z")

</div>

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