Skip to content

Commit

Permalink
- fix for elastic#7733
Browse files Browse the repository at this point in the history
strings with special charracters are not found unless we add a space after it (searching for "test %*" wont work but searching for "test % *" will )


Former-commit-id: 721d3bc
  • Loading branch information
ppisljar committed Jul 14, 2016
1 parent 4872e51 commit 22e6354
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down

0 comments on commit 22e6354

Please sign in to comment.