mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Merge pull request #1478 from mdarse/fix-concept-query-builder
Fix concept query builder & private field wrapping
This commit is contained in:
@@ -79,19 +79,20 @@ class QuotedTextNodeTest extends \PHPUnit_Framework_TestCase
|
||||
"lenient": true
|
||||
}
|
||||
}, {
|
||||
"bool": {
|
||||
"must": [{
|
||||
"filtered": {
|
||||
"filter": {
|
||||
"terms": {
|
||||
"base_id": [1, 2, 3]
|
||||
}
|
||||
}, {
|
||||
},
|
||||
"query": {
|
||||
"multi_match": {
|
||||
"type": "phrase",
|
||||
"fields": ["private_caption.bar.fr", "private_caption.bar.en"],
|
||||
"query": "baz",
|
||||
"lenient": true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
@@ -121,23 +121,27 @@ class TermNodeTest extends \PHPUnit_Framework_TestCase
|
||||
"query": "/qux"
|
||||
}
|
||||
}, {
|
||||
"bool": {
|
||||
"must": [{
|
||||
"filtered": {
|
||||
"filter": {
|
||||
"terms": {
|
||||
"base_id": [1, 2, 3]
|
||||
}
|
||||
}],
|
||||
"should": [{
|
||||
"multi_match": {
|
||||
"fields": ["concept_path.bar"],
|
||||
"query": "/baz"
|
||||
},
|
||||
"query": {
|
||||
"bool": {
|
||||
"should": [{
|
||||
"multi_match": {
|
||||
"fields": ["concept_path.bar"],
|
||||
"query": "/baz"
|
||||
}
|
||||
}, {
|
||||
"multi_match": {
|
||||
"fields": ["concept_path.bar"],
|
||||
"query": "/qux"
|
||||
}
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
"multi_match": {
|
||||
"fields": ["concept_path.bar"],
|
||||
"query": "/qux"
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
@@ -98,19 +98,20 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase
|
||||
"lenient": true
|
||||
}
|
||||
}, {
|
||||
"bool": {
|
||||
"must": [{
|
||||
"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
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
Reference in New Issue
Block a user