module Elasticsearch::Model::Importing

Provides support for easily and efficiently importing large amounts of records from the including class into the index.

@see ClassMethods#import

Public Class Methods

included(base) click to toggle source

When included in a model, adds the importing methods.

@example Import all records from the `Article` model

Article.import

@see import

# File lib/elasticsearch/model/importing.rb, line 36
def self.included(base)
  base.__send__ :extend, ClassMethods

  adapter = Adapter.from_class(base)
  base.__send__ :include, adapter.importing_mixin
  base.__send__ :extend,  adapter.importing_mixin
end