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 float or 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

Type:date Fields with date formatting

Necessary suffix _date

Type:float Fields with floating point numbers

Necessary suffix _float

Type:int Fields with integer values

Necessary suffix _int

Type:bool Fields with boolean values

Necessary suffix _bool

 

Type: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, fuzzy analysis, stemming and synonyms are part of the analysis processes, in addition to the standard lowercasing.

Useful for e.g.: Short description of a product

Necessary suffix _str_short

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

Necessary suffix _str_long

Key Felder

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.

Necessary suffix _str_short_key

Keywords

The analysis consists only of lowercasing.

Useful for special applications where case-sensitive proper names are important.

Necessary suffix _str_keyword

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.

Necessary suffix _data_only