Typing in Makaira Index
This topic is interesting for all those who want to use their own fields in their store for searching and filtering.
So that the new fields also fulfill the desired function they should be provided with the correct typing (also called casting or mapping).
For example, if you want to be able to set filters by slider, you should choose a numeric type
int. The whole thing gets a bit more complicated when
str fields are created for the search. Here we distinguish in the Makaira different cases like short fields, long fields or fields with proper names. Only with the right choice of the type you will get the desired result. In the following we list all types and give beside a short explanation of the type also examples for the use
date Fields with date formatting
float Fields with floating point numbers
int Fields with integer values
bool Fields with boolean values
str Fields with text content. Makaira distinguishes between different types of text fields. Depending on the length and type of content, the text is then analyzed in different ways:
Short text field
The analyzer for most text fields. Decompound, stemming and synonyms are part of the analysis processes, in addition to the standard lowercasing. Fuzzy search can be activated in the Makaira backend.
Useful for e.g.: Short description of a product
Long text field
For long text fields, the Decompound and Fuzzy Search option is disabled to keep the search accuracy as sharp as possible.
Useful for e.g.: Long description of a product
Decompound, stemming is not used in the analysis of these fields.
Useful for e.g.: Manufacturer names, proper names that should only be found in this spelling.
The analysis consists only of lowercasing.
Useful for special applications where case-sensitive proper names are important.
Deactivate typing "data storage only
Useful for large objects that are not to be searched and, for example, are only used for output in the frontend.