-
Notifications
You must be signed in to change notification settings - Fork 2
Search
effkay edited this page Oct 24, 2014
·
1 revision
Qbrick supports fulltext search when using PostgreSQL with a simple LIKE fallback for any other ActiveRecord DB.
Add a call to the search_page_form
helper in your views. This renders
the default search form. The query will be executed by qbrick.
# e.g. _footer.html.haml
= search_page_form
To customize the search and result views you can add your own partials to your rails app. The following partials are overridable.
app/views/qbrick/search
├── _form.html.haml # Search form
├── _results.html.haml # Results list (@pages)
└── _results_entry.html.haml # Single result entry (@page)
When using PostgreSQL, an additional attribute excerpt
will be
available on the page model. It includes a highlighted excerpt of the
matching fulltext
column.