mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Wrap text and concept queries with a single filtered query
This commit is contained in:
@@ -192,22 +192,6 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase
|
||||
"operator": "and",
|
||||
"lenient": true
|
||||
}
|
||||
}, {
|
||||
"filtered": {
|
||||
"filter": {
|
||||
"terms": {
|
||||
"base_id": [1, 2, 3]
|
||||
}
|
||||
},
|
||||
"query": {
|
||||
"multi_match": {
|
||||
"fields": ["private_caption.bar.fr", "private_caption.bar.en"],
|
||||
"query": "baz",
|
||||
"operator": "and",
|
||||
"lenient": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"multi_match": {
|
||||
"fields": [
|
||||
@@ -223,9 +207,20 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
},
|
||||
"query": {
|
||||
"multi_match": {
|
||||
"fields": ["concept_path.bar"],
|
||||
"query": "/qux"
|
||||
"bool": {
|
||||
"should": [{
|
||||
"multi_match": {
|
||||
"fields": ["private_caption.bar.fr", "private_caption.bar.en"],
|
||||
"query": "baz",
|
||||
"operator": "and",
|
||||
"lenient": true
|
||||
}
|
||||
}, {
|
||||
"multi_match": {
|
||||
"fields": ["concept_path.bar"],
|
||||
"query": "/qux"
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user