summaryrefslogtreecommitdiff
path: root/lib/chef_zero/solr/query/subquery.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef_zero/solr/query/subquery.rb')
-rw-r--r--lib/chef_zero/solr/query/subquery.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/chef_zero/solr/query/subquery.rb b/lib/chef_zero/solr/query/subquery.rb
new file mode 100644
index 0000000..3727a20
--- /dev/null
+++ b/lib/chef_zero/solr/query/subquery.rb
@@ -0,0 +1,35 @@
+module ChefZero
+ module Solr
+ module Query
+ class Subquery
+ def initialize(subquery)
+ @subquery = subquery
+ end
+
+ def to_s
+ "(#{@subquery})"
+ end
+
+ def literal_string
+ subquery.literal_string
+ end
+
+ def regexp
+ subquery.regexp
+ end
+
+ def regexp_string
+ subquery.regexp_string
+ end
+
+ def matches_doc?(doc)
+ subquery.matches_doc?(doc)
+ end
+
+ def matches_values?(values)
+ subquery.matches_values?(values)
+ end
+ end
+ end
+ end
+end