diff options
author | Thom May <thom@chef.io> | 2016-07-29 17:00:49 +0100 |
---|---|---|
committer | Thom May <thom@may.lt> | 2016-07-29 17:00:49 +0100 |
commit | e257f450c044616fefbd15e9a180387aaaa572a1 (patch) | |
tree | 6a148967013485078af6601546bdb7b61c623f3c /lib/chef_zero/solr/query/unary_operator.rb | |
parent | 4c86d798010b73c76c916e601ff48c24ffb65dd6 (diff) | |
download | chef-zero-tm/style.tar.gz |
ChefStyletm/style
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.rb | 8 |
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." |