Sha256: 69edf0fd3f06a41d3146d259ccee83b4a57fd187af3aa8ef0d454955a3d6e478

Contents?: true

Size: 1.43 KB

Versions: 106

Compression:

Stored size: 1.43 KB

Contents

module Picky

  # A Bundle is a number of indexes
  # per [index, category] combination.
  #
  # At most, there are three indexes:
  # * *core* index (always used)
  # * *weights* index (always used)
  # * *similarity* index (used with similarity)
  #
  # In Picky, indexing is separated from the index
  # handling itself through a parallel structure.
  #
  # Both use methods provided by this base class, but
  # have very different goals:
  #
  # * *Indexing*::*Bundle* is just concerned with creating index files
  #   and providing helper functions to e.g. check the indexes.
  #
  # * *Index*::*Bundle* is concerned with loading these index files into
  #   memory and looking up search data as fast as possible.
  #
  # This is the indexing bundle.
  #
  # It does all menial tasks that have nothing to do
  # with the actual index running etc.
  # (Find these in Indexed::Bundle)
  #
  class Bundle

    # Saves the indexes in a dump file.
    #
    def dump
      @backend_inverted.dump @inverted
      # THINK about this. Perhaps the strategies should implement the backend methods? Or only the internal index ones?
      #
      @backend_weights.dump @weights if @weight_strategy.respond_to?(:saved?) && @weight_strategy.saved?
      @backend_similarity.dump @similarity if @similarity_strategy.respond_to?(:saved?) && @similarity_strategy.saved?
      @backend_configuration.dump @configuration
      @backend_realtime.dump @realtime
    end

  end

end

Version data entries

106 entries across 106 versions & 1 rubygems

Version Path
picky-4.31.3 lib/picky/bundle_indexing.rb
picky-4.31.2 lib/picky/bundle_indexing.rb
picky-4.31.1 lib/picky/bundle_indexing.rb
picky-4.31.0 lib/picky/bundle_indexing.rb
picky-4.30.0 lib/picky/bundle_indexing.rb
picky-4.29.0 lib/picky/bundle_indexing.rb
picky-4.28.1 lib/picky/bundle_indexing.rb
picky-4.27.1 lib/picky/bundle_indexing.rb
picky-4.27.0 lib/picky/bundle_indexing.rb
picky-4.26.2 lib/picky/bundle_indexing.rb
picky-4.26.1 lib/picky/bundle_indexing.rb
picky-4.26.0 lib/picky/bundle_indexing.rb
picky-4.25.3 lib/picky/bundle_indexing.rb
picky-4.25.2 lib/picky/bundle_indexing.rb
picky-4.25.1 lib/picky/bundle_indexing.rb
picky-4.25.0 lib/picky/bundle_indexing.rb
picky-4.24.0 lib/picky/bundle_indexing.rb
picky-4.23.2 lib/picky/bundle_indexing.rb
picky-4.23.1 lib/picky/bundle_indexing.rb
picky-4.23.0 lib/picky/bundle_indexing.rb