Class: ThinkingSphinx::RealTime::Interpreter
Instance Method Summary
collapse
#initialize, translate!
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class ThinkingSphinx::Core::Interpreter
Instance Method Details
#has(*columns) ⇒ Object
4
5
6
7
8
9
|
# File 'lib/thinking_sphinx/real_time/interpreter.rb', line 4
def has(*columns)
options = columns.
@index.attributes += columns.collect { |column|
::ThinkingSphinx::RealTime::Attribute.new column, options
}
end
|
#indexes(*columns) ⇒ Object
11
12
13
14
15
16
|
# File 'lib/thinking_sphinx/real_time/interpreter.rb', line 11
def indexes(*columns)
options = columns.
@index.fields += columns.collect { |column|
::ThinkingSphinx::RealTime::Field.new column, options
}
end
|
#scope(&block) ⇒ Object
18
19
20
|
# File 'lib/thinking_sphinx/real_time/interpreter.rb', line 18
def scope(&block)
@index.scope = block
end
|
#set_property(properties) ⇒ Object
22
23
24
25
26
|
# File 'lib/thinking_sphinx/real_time/interpreter.rb', line 22
def set_property(properties)
properties.each do |key, value|
@index.send("#{key}=", value) if @index.class.settings.include?(key)
end
end
|
#where(condition) ⇒ Object
28
29
30
|
# File 'lib/thinking_sphinx/real_time/interpreter.rb', line 28
def where(condition)
@index.conditions << condition
end
|