strings with special charracters are not found unless we add a space after it (searching for "test %*" wont work but searching for "test % *" will )
This commit is contained in:
ppisljar 2016-07-14 13:29:42 +02:00
parent ef372ca308
commit 721d3bc29e

View file

@ -84,7 +84,7 @@ app.service('savedVisualizations', function (Promise, es, kbnIndex, SavedVis, Pr
body = {
query: {
simple_query_string: {
query: searchString + '*',
query: searchString + (['/', '!', '?', '&', '=', '%'].indexOf(searchString[searchString.length - 1]) === -1 ? '' : ' ') + '*',
fields: ['title^3', 'description'],
default_operator: 'AND'
}