Filter

In order for filters to be displayed in the store frontend for restricting search results, they must first be configured in Makaira. Filters can be temporarily disabled. Enabled filters are displayed by default for all search result sets where they can further narrow the set. By default, Makaira works with caching of filter values for 15 minutes. Changes can therefore take up to 15 minutes to be displayed by Makaira after import.

Create filter

The configuration of a filter is done by means of the following parameters:

  • Title - is used for identification within Makaira and overview.
  • Active - determines if the filter is displayed
  • Use language specific title (only for attributes) - the attribute name is used as a dynamic title - by default the title is fixed configured
  • Field - defines by which attribute of the record should be filtered:
    • General attributes such as color or size (all attributes set on the imported products are available).
    • Categories in which the search result can be found
    • Script filter (see below)
  • Representation - describes the representation of the filter in the store frontend:
    • List
    • Multiselect list
    • Range slider
    • Checkbox
  • ID - the value set here is used for assembling the forms in the frontend as well as representing selected values in the SEO URL in the format [id]_[Filterwert] and should be accordingly unique and meaningful.
  • Position - influences the order of the filters among themselves in the store frontend.
  • Sorting - sets the order of individual options within a filter:
    • Frequency (option with the most results comes first)
    • Alphabetically ascending
    • Alphabetically descending
    • ATTENTION: If no value is set here the we fallback to "Frequency"
  • Script - if the value "Script" was selected under Field, the corresponding expression can be defined here:
    • the expressions are written in Groovy and must return a boolean value (true/false)
    • Example of an expression of the script filter "In stock": (doc['OXSTOCK'].value + doc['OXVARSTOCK'].value) > 0
  • Show number of items found
  • Show selected values filter on top
  • Depends on... - for complex use cases, where the expression of a filter influences the possible options of another filter (e.g. relationship manufacturer and model), the corresponding dependency can be specified here