Class: Lucene::Term
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Lucene::Term
- Defined in:
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/parser.rb,
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb
Instance Method Summary collapse
-
#match(value) ⇒ Object
compares a query value and a value, tailing ‘*’-wildcards are handled correctly.
- #to_array ⇒ Object
- #transform ⇒ Object
Instance Method Details
#match(value) ⇒ Object
compares a query value and a value, tailing ‘*’-wildcards are handled correctly. Value can either be a string or an array, all other objects are converted to a string and than checked.
51 52 53 54 55 56 57 |
# File 'lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/parser.rb', line 51 def match( value ) if value.is_a?(Array) value.any?{ |x| self.match(x) } else File.fnmatch(self.text_value, value.to_s) end end |
#to_array ⇒ Object
25 26 27 |
# File 'lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb', line 25 def to_array "T:#{self.text_value}" end |
#transform ⇒ Object
29 30 31 |
# File 'lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb', line 29 def transform self.text_value end |