Sha256: c30183568ea6c07fbbf81a89edf18a3326ee2b1fe1017bd55125f4249a29b71c
Contents?: true
Size: 720 Bytes
Versions: 20
Compression:
Stored size: 720 Bytes
Contents
module RocketCMS module Controllers module Search extend ActiveSupport::Concern def index if params[:query].blank? @results = [] else @results = Mongoid::Elasticsearch.search({ body: { query: { query_string: { query: Mongoid::Elasticsearch::Utils.clean(params[:query]) } }, highlight: { fields: { name: {}, content: {} } } }}, page: params[:page], per_page: RocketCMS.config.search_per_page, ) end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems