Object
This does what expander does, flattening the json doc into keys and values so that solr can search them.
# File lib/chef_zero/solr/solr_doc.rb, line 11 def [](key) matching_values { |match_key| match_key == key } end
# File lib/chef_zero/solr/solr_doc.rb, line 15 def matching_values(&block) result = [] key_values(nil, @json) do |key, value| if block.call(key) result << value.to_s end end # Handle manufactured value(s) if block.call('X_CHEF_id_CHEF_X') result << @id.to_s end result.uniq end
Generated with the Darkfish Rdoc Generator 2.