I'm doing a search in elasticsearch where you will have several filters but these filters but you should only bring me results that meet all the filters.
This is the code of the search:
"query" => [
"bool" => [
"must" => [
'multi_match'=> [
'query'=> $this->input->get('search'),
'fields'=> ["title^2", "description"]
]
],
"filter" => [
"terms" => [
"Categories" => ["Featured Works"],
],
"terms" => [
"Tags" => ["Merida"]
]
]
]
],
"aggs"=> [
"Categories"=> [
"terms"=> [
"field"=> "Categories"
]
],
"Tags"=> [
"terms"=> [
"field" =>"Tags"
]
]
]
I'm doing it with Codeigniter, by doing so it brings me the results but that they do not contain one of those values. As an example, it would be an OR instead of an AND