Merge pull request #1497 from mdarse/fix-691-cross-field-query

PHRAS-691
This commit is contained in:
Benoît Burnichon
2015-09-08 10:52:07 +02:00
2 changed files with 7 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ class TextNode extends AbstractTermNode implements ContextAbleInterface
'multi_match' => [
'fields' => $index_fields,
'query' => $this->text,
'type' => 'cross_fields',
'operator' => 'and',
'lenient' => true,
]

View File

@@ -55,6 +55,7 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase
"multi_match": {
"fields": ["foo.fr", "foo.en"],
"query": "bar",
"type": "cross_fields",
"operator": "and",
"lenient": true
}
@@ -94,6 +95,7 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase
"multi_match": {
"fields": ["foo.fr", "foo.en"],
"query": "baz",
"type": "cross_fields",
"operator": "and",
"lenient": true
}
@@ -108,6 +110,7 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase
"multi_match": {
"fields": ["private_caption.bar.fr", "private_caption.bar.en"],
"query": "baz",
"type": "cross_fields",
"operator": "and",
"lenient": true
}
@@ -140,6 +143,7 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase
"multi_match": {
"fields": ["foo.fr", "foo.en"],
"query": "bar",
"type": "cross_fields",
"operator": "and",
"lenient": true
}
@@ -189,6 +193,7 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase
"multi_match": {
"fields": ["foo.fr", "foo.en"],
"query": "baz",
"type": "cross_fields",
"operator": "and",
"lenient": true
}
@@ -212,6 +217,7 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase
"multi_match": {
"fields": ["private_caption.bar.fr", "private_caption.bar.en"],
"query": "baz",
"type": "cross_fields",
"operator": "and",
"lenient": true
}