3
I have a query of Elasticsearch would be using the operator AND
to find the two words (fast AND car) which must have the two words in the result, no matter if the two words are in the title or if the two are in the description or if one word is in the title and the other is in the description, doesn’t matter, but it has to have two words in the result.
The query below is working as OR
bringing results that have the two words and results that have only one of the words.
{
"from" : 0, "size" : 10,
"query": {
"bool": {
"must": [
{
"match": {
"titulo": {
"query": "carro veloz",
"fuzziness": 1
}
}
},
{
"match": {
"descricao": {
"query": "carro veloz",
"fuzziness": 1
}
}
}
]
}
}
}