Class: ThinkingSphinx::Configuration::ConsistentIds

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/configuration/consistent_ids.rb

Instance Method Summary collapse

Constructor Details

#initialize(indices) ⇒ ConsistentIds

Returns a new instance of ConsistentIds



2
3
4
# File 'lib/thinking_sphinx/configuration/consistent_ids.rb', line 2

def initialize(indices)
  @indices = indices
end

Instance Method Details

#reconcileObject



6
7
8
9
10
11
12
13
14
# File 'lib/thinking_sphinx/configuration/consistent_ids.rb', line 6

def reconcile
  return unless sphinx_internal_ids.any? { |attribute|
    attribute.type == :bigint
  }

  sphinx_internal_ids.each do |attribute|
    attribute.type = :bigint
  end
end