I have a simple JSON request for Elasticsearch that looks like this:
"query": {
"bool": {
"must": { "match": { "id": "1" }} ,
"must": { "match": { "tags.name": "a1"}}
}
}
How can I fulfill the second criterion of "must" ONLY if the value ("a1" in this case) is not empty?
user3470960
source
share