This version of Meilisearch introduces two much-requested features:
- Nested field support
- Customize typo-tolerance
This version also brings improvements regarding the indexation speed issues. Please consider using this version and share your feedback on this GitHub discussion.
For more information on updating to the latest Meilisearch version, read our dedicated guide.
New features
Nested field support
Meilisearch now supports nested fields in documents.
{
"id": 0,
"person": {
"firstname": "Guillaume"
}
}
is internally represented as:
{
"id": 0,
"person.firstname": "Guillaume"
}
This allows users to express a nested field location in any API parameter accepting document attributes using the .
(dot-notation). It can be expressed this way in any API parameter accepting document attributes.
e.g. "filterableAttributes": ["person.firstname"]
Customize typo-tolerance
You can customize typo-tolerance via the typoTolerance
settings using either of the following endpoints:
- settings (
/indexes/:index_uid/settings
) - typo-tolerance settings (
/indexes/:index_uid/settings/typo-tolerance
)
The typoTolerance
setting object can contain the following properties:
enabled
: Whether the typo tolerance feature is enabled. (Default:true
)disableOnAttributes
: Disable typo tolerance on specified document attributes. (Default:[]
)disableOnWords
: Disable typo tolerance for a set of query terms given during search. (Default:[]
)minWordSizeForTypos
:oneTypo
: Customize the minimum size for a word to tolerate 1 typo. (Default:5
)twoTypos
: Customize the minimum size for a word to tolerate 2 typos.(Default:9
)
Improve cropping/highlighting
It's now possible to customize the highlight and crop markers/tags when searching documents:
highlightPreTag
: specifiy the tag to put before the highlighted query terms. (Default:<em>
)highlightPostTag
: specifiy the tag to put after the highlighted query terms. (Default:</em>
)cropMarker
: set the crop marker to apply around the cropped part. (Default:...
)
Other improvements:
cropLength
is now a number of words instead of a number of characters
Done by @ManyTheFish (#2214)
Add Japanese support
New language support: Japanese, by setting up Lindera tokenizer.
Thanks to the community for this integration.
Done by @miiton, @djKooks, @mosuka and @ManyTheFish (#2185)
New instance options
New instance options for RAM and CPU usage during indexation:
--max-indexing-memory
(MEILI_MAX_INDEXING_MEMORY
): Sets the maximum RAM size during indexation--max-indexing-threads
(MEILI_MAX_INDEXING_THREADS
): Sets the maximum number of threads available for use during indexation
Done by the amazing @2shiori17 in #2267
Breaking changes
- Stabilize and improve cropping behavior:
cropLength
is now a number of words instead of a number of characters (#2214) @ManyTheFish - Typo-tolerance behavior changes: a typo on the first letter will count as 2 typos. This reduces the possibilities during the search regarding the typo tolerance feature and thus make Meilisearch faster as search time in this case. Indeed, users rarely get the first letter wrong. (milli#439) @MarinPostma
- Add a hard limit of
1000
retrievable documents during search (GET/POST /indexes/:uid/search
) (#2281) @Kerollmops- When calling this endpoint, Meilisearch will not return more than 1000 documents. This limit is a security fix to avoid scraping the Meilisearch DB
- If you still want to scrap your DB to retrieve all your documents, the
GET /indexes/:uid/documents
route is still usable since this limit is not applied to it
- Docker now starts from a different working directory, meaning you're supposed to mount your volume in
/meili_data
.
docker run -it --rm \
-p 7700:7700 \
-v $(pwd)/meili_data:/meili_data \
getmeili/meilisearch:latest
This new command makes the dumps and snapshot features work out-of-the-box with Docker by mounting all the Meilisearch data into meili_data
instead of mounting separated volumes.
Done by @irevoire (#2178)
- Following the Docker good practice, the
meilisearch
binary is not in the current working directory anymore.
When passing arguments to Meilisearch (like--no-analytics
), you cannot call the binary using./meilisearch
but usingmeilisearch
,/meilisearch
, or/bin/meilisearch
. We recommend usingmeilisearch
.
✅ Correct
docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest meilisearch --no-analytics
❌ Wrong
docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --no-analytics
Other improvements
- Improve indexation time when inserting documents (#2203) @Kerollmops @MarinPostma
- Improve
sortableAttributes
andfilterableAttributes
error messages during search (#2140) @brunoocasali - Upgrade dependencies of the Meilisearch, Milli and Tokenizer repositories (#2237) @Kerollmops
Fixes
- Fix panic when sending a document update without content type header (#2277) @MarinPostma
- Avoid embedding user input into error response (#2207) @CNLHC
Misc
- Simplify Docker usage (#2271) @Thearas
- Refactor authentication key extraction (#2253) @MarinPostma
- Cargo: use resolver 2 (#2238) @happysalada
- Use milli's heed dependency (#2228) @psvnlsaikumar
- Add test to validate cli (#2245) @MarinPostma
- Add tests with default CLI opts (#2254) @Kerollmops
- Minor change on our CIs (#2233) @curquiza
- Upgrade the config of issue management (#2263) @curquiza
❤️ Thanks again to our external contributors:
- Meilisearch: @2shiori17, @CNLHC, @happysalada, @psvnlsaikumar, and @Thearas
- Milli: @psvnlsaikumar
- Tokenizer: @djKooks, @miiton, @mosuka, and @Thearas