Implement a search cutoff #4488
Labels
CPU/RAM usage
impacts docs
This issue involves changes in the Meilisearch's documentation
impacts integrations
This issue involves changes in the Meilisearch's integrations
performance
Related to the performance in term of search/indexation speed or RAM/CPU/Disk consumption
v1.8.0
PRs/issues solved in v1.8.0 released on 2024-05-06
Milestone
Related product team resources: PRD (internal only)
Related product discussion:
Related spec: WIP
Motivation
We want to ensure that no search requests run for too long.
The most complex part of the code that can take an unrestricted amount of time right now is the sorting of the results.
Thus, a new mechanism is being introduced in the engine that stops the search requests from sorting more results and returns straight away what has already been sorted.
Then, it must still be highlighted, made into a valid object, and returned to the end user.
Usage
By default, the sorting process of all search requests is stopped after 150ms.
This can be configured through the
PUT /indexes/:index_uid/settings/search-cutoff
route by sending the number of milliseconds that meilisearch is allowed to spend sorting the results.The only way to know if a search request was stopped early is to request the score details.
Detailed usage available here
TODO
main
Reminders when modifying the Setting API
test_setting_routes
macro/settings/my-new-setting
configurated in themake_setting_routes
macro/settings
route configurated in theupdate_all
function/settings
route serializing, e.g., enums case can be different (camelCase
in route andPascalCase
in the dump)Impacted teams
@meilisearch/docs-team
The text was updated successfully, but these errors were encountered: