Browse Source

Revert "Use multi_match in name.* for /search"

This reverts commit 3697627fb7.
pull/140/head
Diana Shkolnikov 10 years ago
parent
commit
061f151bc8
  1. 10
      query/search.js
  2. 24
      test/unit/query/search.js

10
query/search.js

@ -21,12 +21,12 @@ function generate( params ){
// add search condition to filtered query
query.query.filtered.query = {
'bool': {
'must': [{
'multi_match': {
'query': params.input,
'fields': [ 'name.*' ]
'must': [{
'match': {
'name.default': params.input
}
}
}]
]
}
};

24
test/unit/query/search.js

@ -76,11 +76,9 @@ var expected = {
'filtered': {
'query': {
'bool': {
'must': [
{
'multi_match': {
'query': 'test',
'fields': [ 'name.*' ]
'must': [{
'match': {
'name.default': 'test'
}
}
]
@ -156,11 +154,9 @@ module.exports.tests.query = function(test, common) {
'filtered': {
'query': {
'bool': {
'must': [
{
'multi_match': {
'query': 'test',
'fields': [ 'name.*' ]
'must': [{
'match': {
'name.default': 'test'
}
}
]
@ -194,11 +190,9 @@ module.exports.tests.query = function(test, common) {
'filtered': {
'query': {
'bool': {
'must': [
{
'multi_match': {
'query': 'test',
'fields': [ 'name.*' ]
'must': [{
'match': {
'name.default': 'test'
}
}
]

Loading…
Cancel
Save