stadtratmonitor/app/controllers/search_controller.rb

10 lines
236 B
Ruby
Raw Normal View History

class SearchController < ApplicationController
def index
2014-11-19 21:54:36 +01:00
@result = if params[:q].present?
es = Elasticsearch::Client.new
2014-11-19 22:34:14 +01:00
# TODO: Add pagination
2014-11-19 22:33:25 +01:00
es.search index: 'loris', q: params[:q], size: 30
2014-11-19 21:54:36 +01:00
end
end
end