Data query - previous 7th day

Hi Team,

We are trying to get the count of data on previous 7th day.

Below is the query that we are using, however, the problem is that we are not getting the correct count.

The same query we have used in elasticsearch 6 version where it's working fine but in elasticsearch 7 version we are not getting the correct count

Query from Kibana dev tool :

GET subscriber-*/_search
{
"query": {
"bool": {
"must": [
{
"range": {
"created_on": {
"format": "strict_date_optional_time",
"gte": "now-7d/d",
"lte": "now-7d"
}
}
}
],
"filter": [
{
"bool": {
"filter": [
{
"bool": {
"should": [
{
"match_phrase": {
"final_status.keyword": "APPROVED"
}
}
],
"minimum_should_match": 1
}
},
{
"bool": {
"filter": [
{
"bool": {
"should": [
{
"match_phrase": {
"registration_type.keyword": "NIDA_BIOMETRIC"
}
}
],
"minimum_should_match": 1
}
},
{
"bool": {
"should": [
{
"match_phrase": {
"is_old_subscriber.keyword": "0"
}
}
],
"minimum_should_match": 1
}
}
]
}
}
]
}
}
],
"should": ,
"must_not":
}
}
}

In every query we are getting the value 10000.

output :

{
"took" : 8,
"timed_out" : false,
"_shards" : {
"total" : 16,
"successful" : 16,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 10000,
"relation" : "gte"
},
"max_score" : 1.0,
"hits" : [
{
"_index" : "subscriber-2019.12.20",
"_type" : "_doc",
"_id" : "40465420",

Please help on this matter

Hi

10000 is likely the cluster default for max number of hits returned. Maybe in your ES6 cluster this is/was increased. What value are you expecting? You can use scrolling search - see

?

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