|
|
|
@ -23,10 +23,8 @@ module DoctrineSearch |
|
|
|
|
|
|
|
|
|
|
|
without(:id).any_of(search_params[:exclude_ids]) if search_params[:exclude_ids].present? |
|
|
|
without(:id).any_of(search_params[:exclude_ids]) if search_params[:exclude_ids].present? |
|
|
|
|
|
|
|
|
|
|
|
if search_params[:sort_by].blank? |
|
|
|
if search_params[:is_group_by_headnote].to_s.eql?("true") |
|
|
|
order_by :search_year, :desc |
|
|
|
group :headnote |
|
|
|
order_by :search_doc_date, :desc |
|
|
|
|
|
|
|
order_by :reference_number, :desc |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
paginate page: search_params[:page] || 1, per_page: search_params[:per_page] || 20 |
|
|
|
paginate page: search_params[:page] || 1, per_page: search_params[:per_page] || 20 |
|
|
|
|