Duplicate content returned while paginating

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?

"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"

Thank you @Mark_Harwood that solved my issue

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