Sha256: 866a7762ef6838311671d12c6ba35364aa410c1cacf8e91bbff617d6ba1d6907

Contents?: true

Size: 738 Bytes

Versions: 14

Compression:

Stored size: 738 Bytes

Contents

module Picky

  # Indexes indexing.
  #
  class Indexes

    extend Helpers::Indexing

    instance_delegate :clear,
                      :tokenizer

    each_delegate :clear,
                  :to => :indexes

    #
    #
    def self.index scheduler = Scheduler.new
      timed_indexing scheduler do
        instance.index scheduler
      end
    end

    #
    #
    def index scheduler = Scheduler.new
      indexes.each { |index| index.prepare scheduler }
      scheduler.finish

      timed_exclaim "Tokenizing finished, generating data for indexes from tokenized data."

      indexes.each { |index| index.cache scheduler }
      scheduler.finish
    end

    #
    #
    def tokenizer
      Tokenizer.indexing
    end

  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
picky-4.1.0 lib/picky/indexes_indexing.rb
picky-4.0.9 lib/picky/indexes_indexing.rb
picky-4.0.8 lib/picky/indexes_indexing.rb
picky-4.0.7 lib/picky/indexes_indexing.rb
picky-4.0.6 lib/picky/indexes_indexing.rb
picky-4.0.5 lib/picky/indexes_indexing.rb
picky-4.0.4 lib/picky/indexes_indexing.rb
picky-4.0.3 lib/picky/indexes_indexing.rb
picky-4.0.1 lib/picky/indexes_indexing.rb
picky-4.0.0 lib/picky/indexes_indexing.rb
picky-4.0.0pre6 lib/picky/indexes_indexing.rb
picky-4.0.0pre5 lib/picky/indexes_indexing.rb
picky-4.0.0pre3 lib/picky/indexes_indexing.rb
picky-4.0.0pre2 lib/picky/indexes_indexing.rb