retrospring/app/views/search/index.haml
Georg Gadinger 44871cbf4a add meilisearch
this thing is way too fast!  only downside is that indexing takes a bit
longer, and the search indexes are big (16Gi for 2.7 million records)

i have no idea how to properly integrate it in the UI, but it seems
promising :^)
2023-10-22 19:51:19 +02:00

24 lines
854 B
Text

.container-lg.container--main
.row
.col-sm-10.col-md-10.col-lg-9.mx-auto
.card
.card-body
= bootstrap_form_with url: search_path, layout: :inline, method: :get do |f|
= f.text_field :q, skip_label: true, append: f.primary("Search"), value: params[:q]
= f.check_box :multi_search, label: "Multisearch"
- unless @results.blank?
.container-lg.container--main
.row
.col-sm-10.col-md-10.col-lg-9.mx-auto
- @results.each do |result|
- case result
- when Answer
= render "answerbox", a: result, display_all: false, subscribed_answer_ids: []
- when Question
= render "shared/question", q: result, type: nil
= render 'shared/links'
:ruby
provide(:title, generate_title('Search'))
parent_layout 'base'