Class: ThinkingSphinx::Interfaces::RealTime
- Defined in:
- lib/thinking_sphinx/interfaces/real_time.rb
Instance Method Summary collapse
- #clear ⇒ Object
- #index ⇒ Object
-
#initialize(configuration, options, stream = STDOUT) ⇒ RealTime
constructor
A new instance of RealTime.
Constructor Details
#initialize(configuration, options, stream = STDOUT) ⇒ RealTime
Returns a new instance of RealTime.
4 5 6 7 8 9 10 |
# File 'lib/thinking_sphinx/interfaces/real_time.rb', line 4 def initialize(configuration, , stream = STDOUT) super configuration.preload_indices command :prepare end |
Instance Method Details
#clear ⇒ Object
12 13 14 |
# File 'lib/thinking_sphinx/interfaces/real_time.rb', line 12 def clear command :clear_real_time, :indices => indices end |
#index ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/thinking_sphinx/interfaces/real_time.rb', line 16 def index return if indices.empty? if !command :running stream.puts <<-TXT The Sphinx daemon is not currently running. Real-time indices can only be populated by sending commands to a running daemon. TXT return end command :index_real_time, :indices => indices end |