Sha256: 96a5b7bbdaf40e19bce4539ae13c962533d66bbd11afa34b9bc317ce5847ecc9

Contents?: true

Size: 998 Bytes

Versions: 14

Compression:

Stored size: 998 Bytes

Contents

module Index
  
  # An index that is persisted in files, loaded at startup and kept in memory at runtime.
  #
  class Memory < Base
    
    # Create a new memory index for indexing and for querying.
    #
    # Parameters:
    # * name: The identifier of the index. Used:
    #   - to identify an index (e.g. by you in Rake tasks: Indexes[:the_identifier]).
    #   - in the frontend to describe which index a result came from.
    #   - index directory naming (index/development/the_identifier/<lots of indexes>)
    # * source: The source the data comes from. See Sources::Base.
    #
    # Options:
    # * result_identifier: Use if you'd like a different identifier/name in the results JSON than the name of the index. 
    #
    def initialize name, source, options = {}
      options[:indexing_bundle_class] ||= Internals::Indexing::Bundle::Memory
      options[:indexed_bundle_class]  ||= Internals::Indexed::Bundle::Memory
      
      super name, source, options
    end
    
  end
  
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
picky-2.1.2 lib/picky/index/memory.rb
picky-2.1.1 lib/picky/index/memory.rb
picky-2.1.0 lib/picky/index/memory.rb
picky-2.0.0 lib/picky/index/memory.rb
picky-2.0.0.pre3 lib/picky/index/memory.rb
picky-2.0.0.pre2 lib/picky/index/memory.rb
picky-2.0.0.pre1 lib/picky/index/memory.rb
picky-1.5.4 lib/picky/index/memory.rb
picky-1.5.3 lib/picky/index/memory.rb
picky-1.5.2 lib/picky/index/memory.rb
picky-1.5.1 lib/picky/index/memory.rb
picky-1.5.0 lib/picky/index/memory.rb
picky-1.4.3 lib/picky/index/memory.rb
picky-1.4.2 lib/picky/index/memory.rb