mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2025-04-20 07:11:33 +02:00
Replace direct ES access with elasticsearch-model
This commit is contained in:
parent
5a07703166
commit
973af9f0d9
5 changed files with 18 additions and 9 deletions
|
@ -1,9 +1,8 @@
|
|||
class SearchController < ApplicationController
|
||||
def index
|
||||
@result = if params[:q].present?
|
||||
es = Elasticsearch::Client.new
|
||||
# TODO: Add pagination
|
||||
es.search index: 'loris', q: params[:q], size: 30
|
||||
Paper.search(params[:q]).records
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue