diff options
author | Sergey Tuchkin <stuchkin@griddynamics.com> | 2015-08-17 18:38:30 +0300 |
---|---|---|
committer | Sergey Tuchkin <stuchkin@griddynamics.com> | 2015-08-17 18:38:30 +0300 |
commit | ade31a59b3389f72b6f82aa1a9670769ad187261 (patch) | |
tree | 4f0e2c1384ac414c5832e0646b64d5d4cf00141d | |
parent | 228d9ffa1b22c78b6756b4299f2b8e087cb1928d (diff) | |
download | chef-zero-ade31a59b3389f72b6f82aa1a9670769ad187261.tar.gz |
Fix scary search behavior on terms containing dash character
-rw-r--r-- | lib/chef_zero/solr/query/regexpable_query.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef_zero/solr/query/regexpable_query.rb b/lib/chef_zero/solr/query/regexpable_query.rb index 241e675..cebc011 100644 --- a/lib/chef_zero/solr/query/regexpable_query.rb +++ b/lib/chef_zero/solr/query/regexpable_query.rb @@ -21,8 +21,8 @@ module ChefZero end DEFAULT_FIELD = "text" - WORD_CHARACTER = "[A-Za-z0-9@._':]" - NON_WORD_CHARACTER = "[^A-Za-z0-9@._':]" + WORD_CHARACTER = "[A-Za-z0-9@._':\-]" + NON_WORD_CHARACTER = "[^A-Za-z0-9@._':\-]" end end end |