Learn about how Meilisearch handles different data types: strings, numerical values, booleans, arrays, and objects.
に
and で
to the end of a word.
There are two kinds of separators in Meilisearch: soft and hard. Hard separators signal a significant context switch such as a new sentence or paragraph. Soft separators only delimit one word from another but do not imply a major change of subject.
The list below presents some of the most common separators in languages using the Latin alphabet:
'-' | '_' | '\'' | ':' | '/' | '\\' | '@' | '"' | '+' | '~' | '=' | '^' | '*' | '#'
'.' | ';' | ',' | '!' | '?' | '(' | ')' | '[' | ']' | '{' | '}'| '|'
Bruce
and Willis
is equal to 1. The distance between Vin
and Diesel
is also 1. However, the distance between Willis
and Vin
is equal to 8. The same calculations apply to Bruce
and Diesel
(10), Bruce
and Vin
(9), and Willis
and Diesel
(9).
Let’s see another example. Given two documents:
Bruce Willis
, 002
will be the first document returned, and 001
will be the second one. This will happen because the proximity distance between Bruce
and Willis
is equal to 2 in the document 002
, whereas the distance between Bruce
and Willis
is equal to 8 in the document 001
since the full-stop character .
is a hard space.
integer
, float
) is converted to a human-readable decimal number string representation. Numeric types can be searched as they are converted to strings.
You can add custom ranking rules to create an ascending or descending sorting rule on a given attribute that has a numeric value in the documents.
You can also create filters. The >
, >=
, <
, <=
, and TO
relational operators apply only to numerical values.
true
or false
, is received and converted to a lowercase human-readable text (true
and false
). Booleans can be searched as they are converted to strings.
null
null
type can be pushed into Meilisearch but it won’t be taken into account for indexing.
patient_name
key contains an object:
address
, containing home and work addresses, each of which are objects themselves. After flattening, the document would look like this:
appointments
array:
0
and 1
:
Jester Lavorre
in 2022-01-01
. Instead, it returns patients who had an appointment with Jester Lavorre
, and patients who had an appointment in 2022-01-01
.
The best way to work around this limitation is reformatting your data. The above example could be fixed by merging appointment data in a new appointmentsMerged
field so the relationship between appointment and doctor remains intact:
.
will be considered as hard spaces.
10,3
will be broken into two strings—10
and 3
—instead of being processed as a numeric type.