Reputation: 711
I wrote the following query to fetch records from an Elastic Search cluster.
{
"query" : {
"query_string" : {
"query" : "One Record"
}
},
"explain" : true
}
However, later I found out that the following query also produces the same results.
{
"query" : {
"bool" : {
"should" : {
"query_string" : {
"query" : "One Record"
}
}
}
},
"explain" : true
}
Will both the above queries always produce the same results?
Upvotes: 0
Views: 105
Reputation: 206
A bool query merely combines other types of queries and adds over the scores , hence the above two queries will always give the same result.
Upvotes: 1