Range query and pagination

Hi team,

I have log index which contains product and modification date and its has around 10M documents with duplicates of products since the same products modified on different date. i have a requirement to create REST API to retrieve the documents that are modified during the specific time frame.

I am using the following query in my rest API . i am retrieving the all the documents which are modified in the given time frame by passing the pagination value.

The query returns the different product when i execute the same query on multiple time with same total with same time duration.

For example :
I have executed the query in the first time. it return the 15K documents.
In the second time its returns the different products but total is same.

GET Iog_index/_search
{
"from":0,  
"size": 200, 
  "query": {  
      "range": {
        "Timestamp": {
          "gte": "2019-11-06 10:00:00",
          "lte": "2019-11-07 13:00:00",
          "format": "yyyy-MM-dd HH:mm:ss"
        }
      }
  }
}

Mapping:

{
  "logIndex": {
    "mappings": {
      "logType": {
        "properties": {
          "Application": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword"
              }
            }
          },
          "modifiedBy": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword"
              }
            }
          },
          "product": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword"
              }
            }
          },
          "Timestamp": {
            "type": "date",
            "format": "yyyy-MM-dd HH:mm:ss"
          }
        }
      }
    }
  }
}

Could you please help me out to resolve this issue.

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