Sha256: 8c365e93156d7ec125a0105260db9d7c2c9cefcd9534a65a8c768d8d50b53c51
Contents?: true
Size: 710 Bytes
Versions: 17
Compression:
Stored size: 710 Bytes
Contents
# frozen_string_literal: true class ThinkingSphinx::Configuration::ConsistentIds def initialize(indices) @indices = indices end def reconcile return unless sphinx_internal_ids.any? { |attribute| attribute.type == :bigint } sphinx_internal_ids.each do |attribute| attribute.type = :bigint end end private def attributes @attributes = sources.collect(&:attributes).flatten end def sphinx_internal_ids @sphinx_internal_ids ||= attributes.select { |attribute| attribute.name == 'sphinx_internal_id' } end def sources @sources ||= @indices.select { |index| index.respond_to?(:sources) }.collect(&:sources).flatten end end
Version data entries
17 entries across 17 versions & 1 rubygems