ES v1.7.1 Returning almost similar results on every page


(Sujeet Kulkarni) #1
GET _search
{
  "from": 0,
  "size": 10,
  "query": {  
        "term": {
          "artifactName": {
            "value": "rosa parks"
          }
        }
  }
}

This a sample query which I am trying to run on ES and Its running
well but when I select the from as 1 the results of this are similar to
what I got the previous set the only exception is that the first result
is excluded.

Example of my issue:

Page Results

0 1-10

2 2-11 (Expecting 11-20)

Could you please point me in the direction where I am going wrong?


(Ivan Brusic) #2

The from parameter is not the page offset, but simply the document size.
from: 1 size: 10 returns documents 2-11.

The next page of results should be the query size + 1 (for the second
page), 2*query size +1 for the third page, etc..

Ivan


(system) #3