mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
PHRAS-2497 #comment port to 4.1 Search issue when query mix data from Public and Private field
#time 2h
This commit is contained in:
@@ -47,7 +47,9 @@ class QuotedTextNodeTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testQueryBuildWithPrivateFields()
|
||||
{
|
||||
$public_field = new Field('foo', FieldMapping::TYPE_STRING, ['private' => false]);
|
||||
$public_field = new Field('foo', FieldMapping::TYPE_STRING, [
|
||||
'private' => false
|
||||
]);
|
||||
$private_field = new Field('bar', FieldMapping::TYPE_STRING, [
|
||||
'private' => true,
|
||||
'used_by_collections' => [1, 2, 3]
|
||||
@@ -75,7 +77,10 @@ class QuotedTextNodeTest extends \PHPUnit_Framework_TestCase
|
||||
"should": [{
|
||||
"multi_match": {
|
||||
"type": "phrase",
|
||||
"fields": ["foo.fr", "foo.en"],
|
||||
"fields": [
|
||||
"foo.fr",
|
||||
"foo.en"
|
||||
],
|
||||
"query": "baz",
|
||||
"lenient": true
|
||||
}
|
||||
@@ -89,7 +94,12 @@ class QuotedTextNodeTest extends \PHPUnit_Framework_TestCase
|
||||
"query": {
|
||||
"multi_match": {
|
||||
"type": "phrase",
|
||||
"fields": ["private_caption.bar.fr", "private_caption.bar.en"],
|
||||
"fields": [
|
||||
"private_caption.bar.fr",
|
||||
"private_caption.bar.en",
|
||||
"foo.fr",
|
||||
"foo.en"
|
||||
],
|
||||
"query": "baz",
|
||||
"lenient": true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user