Class: ThinkingSphinx::Middlewares::IdsOnly

Inherits:
Middleware
  • Object
show all
Defined in:
lib/thinking_sphinx/middlewares/ids_only.rb

Instance Method Summary collapse

Methods inherited from Middleware

#initialize

Constructor Details

This class inherits a constructor from ThinkingSphinx::Middlewares::Middleware

Instance Method Details

#call(contexts) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/thinking_sphinx/middlewares/ids_only.rb', line 4

def call(contexts)
  contexts.each do |context|
    context[:results] = context[:results].collect { |row|
      row['sphinx_internal_id']
    }
  end

  app.call contexts
end