class PrettySearch::Collection

@abstract PrettySearch::Collection is the abstract class representing a searchable collection of records.

Implementations should include:

- #search(PrettySearch::Query) returning Array<PrettySearch::Document>

See implementations in lib/pretty_search/collection

Public Class Methods

load(data_file, options = {}) click to toggle source

@return [PrettySearch::Collection, search] TODO: return IndexedCollection when multiple searches is supported

# File lib/pretty_search/collection.rb, line 15
def self.load(data_file, options = {})
  PrettySearch::MemoryCollection.new(data_file, first: options[:first])
end