summaryrefslogtreecommitdiff
path: root/lib/chef_zero/solr/query/unary_operator.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-08-02 15:10:37 +0100
committerThom May <thom@may.lt>2016-08-02 15:10:37 +0100
commitf18b35f4a94ae163a3f4467d03d9b5a89ea3aee7 (patch)
tree0a326f32a0add99db653880a531f1e8b951ef231 /lib/chef_zero/solr/query/unary_operator.rb
parente37ffed627248082b138bb87123dcb1e5be074b2 (diff)
downloadchef-zero-f18b35f4a94ae163a3f4467d03d9b5a89ea3aee7.tar.gz
support ! in searchestm/support_bang_operator
Signed-off-by: Thom May <thom@may.lt>
Diffstat (limited to 'lib/chef_zero/solr/query/unary_operator.rb')
-rw-r--r--lib/chef_zero/solr/query/unary_operator.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef_zero/solr/query/unary_operator.rb b/lib/chef_zero/solr/query/unary_operator.rb
index e83683c..2f34653 100644
--- a/lib/chef_zero/solr/query/unary_operator.rb
+++ b/lib/chef_zero/solr/query/unary_operator.rb
@@ -16,7 +16,7 @@ module ChefZero
def matches_doc?(doc)
case @operator
- when "-", "NOT"
+ when "-", "NOT", "!"
!operand.matches_doc?(doc)
when "+"
# TODO This operator uses relevance to eliminate other, unrelated
@@ -27,7 +27,7 @@ module ChefZero
def matches_values?(values)
case @operator
- when "-", "NOT"
+ when "-", "NOT", "!"
!operand.matches_values?(values)
when "+"
# TODO This operator uses relevance to eliminate other, unrelated