# File lib/thinking_sphinx/distributed/index.rb, line 37 def primary_key @primary_key ||= configuration.settings['primary_key'] || :id end
class ThinkingSphinx::Distributed::Index
Attributes
local_index_objects[R]
options[R]
reference[R]
Public Class Methods
new(reference)
click to toggle source
Calls superclass method
# File lib/thinking_sphinx/distributed/index.rb, line 8 def initialize(reference) @reference = reference @options = {} @local_index_objects = [] super reference.to_s.gsub('/', '_') end
Public Instance Methods
delta?()
click to toggle source
# File lib/thinking_sphinx/distributed/index.rb, line 16 def delta? false end
distributed?()
click to toggle source
# File lib/thinking_sphinx/distributed/index.rb, line 20 def distributed? true end
facets()
click to toggle source
# File lib/thinking_sphinx/distributed/index.rb, line 24 def facets local_index_objects.collect(&:facets).flatten end
local_index_objects=(indices)
click to toggle source
# File lib/thinking_sphinx/distributed/index.rb, line 28 def local_index_objects=(indices) self.local_indices = indices.collect(&:name) @local_index_objects = indices end
model()
click to toggle source
# File lib/thinking_sphinx/distributed/index.rb, line 33 def model @model ||= reference.to_s.camelize.constantize end
primary_key()
click to toggle source
Private Instance Methods
configuration()
click to toggle source
# File lib/thinking_sphinx/distributed/index.rb, line 43 def configuration ThinkingSphinx::Configuration.instance end