Class: Lucene::FieldName
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Lucene::FieldName
- 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
Instance Method Details
#match(item) ⇒ Object
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/parser.rb', line 101 def match( item ) if self.text_value.count("_") > 0 item.merge!(build_flat_hash(item)) end if self.text_value.end_with?("*") part = self.text_value.chomp("*") item.keys.collect{ |key| key.start_with?(part)? key: nil}.compact else if item.has_key?(self.text_value) [self.text_value,] else nil end end end |
#to_array ⇒ Object
111 112 113 |
# File 'lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb', line 111 def to_array self.text_value end |
#transform ⇒ Object
115 116 117 |
# File 'lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb', line 115 def transform to_array end |