Answer the question
In order to leave comments, you need to log in
How to search in ElasticSearch only when all words match?
I have a product catalog. Elastic stores all attributes and description. When I search for a phrase, I only want to see products that match all of the attributes. For example now, when I search for "black jacket xxl", in addition to a complete match, I also get those who have "black jacket", "black xxl" and the like. I'm looking for a design like this:
'match' => [
'message' => [
'query' => 'black jacket xxl',
'operator' => 'and'
]
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question