I have two queries. And in the index all of the data have collectHour as 10.
if I request both queries, the one with more match statements was faster....
I am curious, if all fields are inspected as columns that are in indexes in mysql DBs.
if I ever need fast searches, is it recommended to add more match fields that share the same values in all documents?
GET indexname/_count
{
"query": {
"bool": {
"must": [
{
"match": {
"collectDate": "2021-10-27"
}
}
]
}
}
}
GET indexname/_count
{
"query": {
"bool": {
"must": [
{
"match": {
"collectHour": "10"
}
},
{
"match": {
"collectDate": "2021-10-27"
}
}
]
}
}
}