summaryrefslogtreecommitdiff
path: root/lib/chef_zero/solr/query/unary_operator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef_zero/solr/query/unary_operator.rb')
-rw-r--r--lib/chef_zero/solr/query/unary_operator.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef_zero/solr/query/unary_operator.rb b/lib/chef_zero/solr/query/unary_operator.rb
index a873932..e83683c 100644
--- a/lib/chef_zero/solr/query/unary_operator.rb
+++ b/lib/chef_zero/solr/query/unary_operator.rb
@@ -16,9 +16,9 @@ module ChefZero
def matches_doc?(doc)
case @operator
- when '-', 'NOT'
+ when "-", "NOT"
!operand.matches_doc?(doc)
- when '+'
+ when "+"
# TODO This operator uses relevance to eliminate other, unrelated
# expressions. +a OR b means "if it has b but not a, don't return it"
raise "+ not supported yet, because it is hard."
@@ -27,9 +27,9 @@ module ChefZero
def matches_values?(values)
case @operator
- when '-', 'NOT'
+ when "-", "NOT"
!operand.matches_values?(values)
- when '+'
+ when "+"
# TODO This operator uses relevance to eliminate other, unrelated
# expressions. +a OR b means "if it has b but not a, don't return it"
raise "+ not supported yet, because it is hard."