I have some documents in elasticsearch.
first I do
{
"sort":[
"@timestamp"
],
"query":{
"in":{
"action_type":[
"start",
"end"
]
}
},
"size":0
}
I get
{
"took":58,
"timed_out":false,
"_shards":{
"total":5,
"successful":5,
"failed":0
},
"hits":{
"total":24435,
"max_score":0.0,
"hits":[
]
}
}
Then I want to get latest 100 document, I do
{
"sort":[
"@timestamp"
],
"query":{
"in":{
"action_type":[
"start",
"end"
]
}
},
"from":24335,
"size":100
}
it returns
{
"took":25,
"timed_out":false,
"_shards":{
"total":5,
"successful":5,
"failed":0
},
"hits":{
"total":18327,
"max_score":null,
"hits":[
]
}
}
Basically, the 2nd query indicates the total
has been changed.
If I do the first query again, then still get the 1st result.
Why two queries are not returning same result?
by the way, if I use filter
, it is the same
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/36fab4b9-ad31-459e-a94d-88e9bbca4883%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.