Count api value and the hit value on the dashboard doesn’t match

I want to know the number of document items that have a specific value in it such as items that have a specific user name. So I queried on the dashboard with a filter on. (user:user1) It says 403 hits. And I queried this with count api. My json_data is {‘query’:{

‘match’:{

‘user’: ‘user1’,

},

},

}

When I run the code, it returns 835491. Why are the two numbers different? When I change ‘match’ in json to ‘term’, it returns 0.

Hi @nevermet ,

Can you provide the exact search used and a sample of the log queried so I can gen a test on my end.

Leeroy.