{
"query": {
"bool": {
"must": {
"multi_match": {
"type": "best_fields",
"query": "{{{ query }}}",
"fields": [
"fields.title.search^3",
"fields.teaser.search^2",
"fields.content.search",
"fields.name.search"
]
}
},
"should": {
"match_phrase": {
"fields.content.search": "{{{ query }}}"
}
},
"filter": [
{
"regexp": {
"project.name.raw": {
"value": "{{{ projects }}}",
"flags": "ANYSTRING"
}
}
},
{
"regexp": {
"language.raw": {
"value": "{{{ language }}}",
"flags": "ANYSTRING"
}
}
},
{
"match": {
"fields.searchtags": {
"query": "{{{ tags }}}",
"operator": "and",
"zero_terms_query": "all"
}
}
}
]
}
},
"aggregations": {
"searchtags": {
"terms": {
"field": "fields.searchtags.taglist",
"size": 9999,
"min_doc_count": 1
}
}
},
"_source": [
"project.name",
"uuid",
"language",
"fields.title"
]
}