Object
# File lib/ferret_adapter/local_index.rb, line 4 def initialize(options) @options = options @options = { :path => @options[:path], :key => [:id, :_type] } create_or_initialize_index end
# File lib/ferret_adapter/local_index.rb, line 22 def [](id) @index[id] end
# File lib/ferret_adapter/local_index.rb, line 10 def add(doc) @index << doc end
# File lib/ferret_adapter/local_index.rb, line 14 def delete(query) @index.query_delete(query) end
# File lib/ferret_adapter/local_index.rb, line 18 def search(query, options = {}) @index.search(query, options).hits.collect { |hit, score| @index[hit.doc] } end
[Validate]
Generated with the Darkfish Rdoc Generator 2.