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.



4
5
6
# File 'lib/thinking_sphinx/configuration/consistent_ids.rb', line 4

def initialize(indices)
  @indices = indices
end

Instance Method Details

#reconcileObject



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

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

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