for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
# frozen_string_literal: true
module NoSE
# Loaders which insert data into indexes from external sources
module Loader
# Superclass for all data loaders
class LoaderBase
def initialize(workload = nil, backend = nil)
@workload = workload
@backend = backend
end
# :nocov:
# @abstract Subclasses should produce a workload
# @return [void]
def workload(_config)
fail NotImplementedError
# @abstract Subclasses should load data for the given list of indexes
def load(_indexes, _config, _show_progress = false, _limit = nil,
_skip_existing = true)
# @abstract Subclasses should generate a model from the external source
def model(_config)