Sha256: 888d115de12e361fb0007a8841a035c6b45da609e107c5245f7fac81aeb6c9b0
Contents?: true
Size: 1.18 KB
Versions: 44
Compression:
Stored size: 1.18 KB
Contents
module Picky module Query # TODO Remove. # class IndexesCheck class << self # Returns the right combinations strategy for # a number of query indexes. # # Currently it isn't possible using Memory and Redis etc. # indexes in the same query index group. # # Picky will raise a Query::Indexes::DifferentTypesError. # def check_backend_types index_definitions_ary # :nodoc: backend_types = index_definitions_ary.map(&:backend).map(&:class) backend_types.uniq! raise_different backend_types if backend_types.size > 1 backend_types end def raise_different backend_types # :nodoc: raise DifferentTypesError.new(backend_types) end end end # Currently it isn't possible using Memory and Redis etc. # indexes in the same query index group. # class DifferentTypesError < StandardError # :nodoc:all def initialize types @types = types end def to_s "Currently it isn't possible to mix Indexes with backends #{@types.join(" and ")} in the same Search instance." end end end end
Version data entries
44 entries across 44 versions & 1 rubygems