Sha256: 96788f9daba5a51a031075b6c316956411b3778743316c979d10e39cf35444d6

Contents?: true

Size: 500 Bytes

Versions: 5

Compression:

Stored size: 500 Bytes

Contents

module Cadet
  module CadetIndex
    class IndexProvider
      include_package "org.neo4j.index.impl.lucene"
      def initialize(db)
        @db = db
        @indexes = {}
        @lucene_index = LuceneBatchInserterIndexProviderNewImpl.new(db)
      end
      def nodeIndex(name, type)
        @indexes[name] ||= Cadet::CadetIndex::Index.new(@lucene_index, name, type)
      end
      def shutdown
        @indexes.each do |name, index|
          index.flush
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cadet-0.0.6-java lib/cadet/cadet_index/index_provider.rb
cadet-0.0.5-java lib/cadet/cadet_index/index_provider.rb
cadet-0.0.4-java lib/cadet/cadet_index/index_provider.rb
cadet-0.0.3-java lib/cadet/cadet_index/index_provider.rb
cadet-0.0.2-java lib/cadet/cadet_index/index_provider.rb