Sha256: 2d250686b33ee90bd529f55bd3c487b340ddb9e145834eacf48a613d39e48446

Contents?: true

Size: 740 Bytes

Versions: 28

Compression:

Stored size: 740 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

28 entries across 28 versions & 1 rubygems

Version Path
picky-4.6.3 lib/picky/indexes_indexing.rb
picky-4.6.2 lib/picky/indexes_indexing.rb
picky-4.6.1 lib/picky/indexes_indexing.rb
picky-4.6.0 lib/picky/indexes_indexing.rb
picky-4.5.12 lib/picky/indexes_indexing.rb
picky-4.5.11 lib/picky/indexes_indexing.rb
picky-4.5.10 lib/picky/indexes_indexing.rb
picky-4.5.9 lib/picky/indexes_indexing.rb
picky-4.5.8 lib/picky/indexes_indexing.rb
picky-4.5.7 lib/picky/indexes_indexing.rb
picky-4.5.6 lib/picky/indexes_indexing.rb
picky-4.5.5 lib/picky/indexes_indexing.rb
picky-4.5.4 lib/picky/indexes_indexing.rb
picky-4.5.3 lib/picky/indexes_indexing.rb
picky-4.5.2 lib/picky/indexes_indexing.rb
picky-4.5.1 lib/picky/indexes_indexing.rb
picky-4.5.0 lib/picky/indexes_indexing.rb
picky-4.4.2 lib/picky/indexes_indexing.rb
picky-4.4.1 lib/picky/indexes_indexing.rb
picky-4.4.0 lib/picky/indexes_indexing.rb