mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-10-18 23:54:37 +02:00
7 lines
287 B
Ruby
7 lines
287 B
Ruby
class SearchController < ApplicationController
|
|
def index
|
|
@response = Paper.search(params[:q])
|
|
@papers = @response.page(params[:page]).results
|
|
@paper_type_facets = @response.response['aggregations']['paper_types']['buckets'].map {|h| [ h['key'], h['doc_count']] }
|
|
end
|
|
end
|