Merge pull request #1478 from mdarse/fix-concept-query-builder

Fix concept query builder & private field wrapping
This commit is contained in:
Benoît Burnichon
2015-08-26 18:07:58 +02:00
6 changed files with 34 additions and 27 deletions

View File

@@ -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
}
}]
}
}
}]
}

View File

@@ -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"
}
}]
}
}
}]
}

View File

@@ -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
}
}]
}
}
}]
}