summaryrefslogtreecommitdiff
path: root/lib/chef_zero
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2016-07-19 18:33:46 +0100
committerGitHub <noreply@github.com>2016-07-19 18:33:46 +0100
commitdc9d105e577635106c1766e911526e3f7d31d1d1 (patch)
treeee6d2af510a327190b776d76c138ec63be536abc /lib/chef_zero
parent022397b795344045535c6ee34a38c0465d1c862e (diff)
parentade31a59b3389f72b6f82aa1a9670769ad187261 (diff)
downloadchef-zero-dc9d105e577635106c1766e911526e3f7d31d1d1.tar.gz
Merge pull request #158 from amazon/dash-search-fix
Fix scary search behavior on terms containing dash character
Diffstat (limited to 'lib/chef_zero')
-rw-r--r--lib/chef_zero/solr/query/regexpable_query.rb4
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