Class: ThinkingSphinx::RealTime::Index::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/real_time/index/template.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Template) initialize(index)

Returns a new instance of Template



4
5
6
# File 'lib/thinking_sphinx/real_time/index/template.rb', line 4

def initialize(index)
  @index = index
end

Instance Attribute Details

- (Object) index (readonly)

Returns the value of attribute index



2
3
4
# File 'lib/thinking_sphinx/real_time/index/template.rb', line 2

def index
  @index
end

Instance Method Details

- (Object) apply



8
9
10
11
12
13
14
# File 'lib/thinking_sphinx/real_time/index/template.rb', line 8

def apply
  add_field class_column, :sphinx_internal_class_name

  add_attribute :id,          :sphinx_internal_id,    :integer
  add_attribute class_column, :sphinx_internal_class, :string, :facet => true
  add_attribute 0,            :sphinx_deleted,        :integer
end