diff --git a/server/modules/search/elasticsearch/engine.js b/server/modules/search/elasticsearch/engine.js index b1d36e4ec7..0a97ed7989 100644 --- a/server/modules/search/elasticsearch/engine.js +++ b/server/modules/search/elasticsearch/engine.js @@ -92,8 +92,26 @@ module.exports = { index: this.config.indexName, body: { query: { - simple_query_string: { - query: q + bool: { + filter: [ + { + bool: { + should: [ + { + simple_query_string: { + query: q + } + }, + { + query_string: { + query: "*" + q + "*" + } + } + ], + minimum_should_match: 1 + } + } + ] } }, from: 0,