Skip to content
antonykamp edited this page Nov 30, 2022 · 1 revision

Search

Search helper

You can use the functionality of the search page in your code. Import the helper search_for_items. It returns an array of items that matches your request. It requires the following arguments:

search_term

You are looking for relevant search attributes, partially matching search. Currently results include items where all words of the search term appear in at least one of the relevant search attributes.

filter_category

filter search results with a hash in the form. Eg:

{"filter_name_a" => "filter_value_a", "filter_name_b" => "filter_value_b"}

filter_numerical

filter search by numerial range in the form:

{"search_name" => {"lower_bound" => 8, "upper_bound" => 10}, ...}
Clone this wiki locally