Hello
I have two documents in the elastic search database
document 1
{
section = "baby"
category = "Clothing"
subcategory = "shoe"
}
document 2
{
section = "baby"
category = "Clothing"
subcategory = ""
}
I want to search with elastic search which is the most suitable for research (baby, Clothing)
I want the result to be document 2 because it is the most suitable
but the problem is both contains baby and clothes
I tried with
GET / _search
{
"query": {
"bool": {
"should": [
{"query_string": {
"query": "baby"
}},
{
"query_string": {
"query": "clothing"
}}
]
}
}
}
I got score (document1)> score (document2) I did not understand
is there anyone can help me write my request to get document2 that resembles the most of the search criteria