Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a search cutoff #4488

Closed
6 of 8 tasks
Tracked by #4467
irevoire opened this issue Mar 13, 2024 · 1 comment · Fixed by #4466
Closed
6 of 8 tasks
Tracked by #4467

Implement a search cutoff #4488

irevoire opened this issue Mar 13, 2024 · 1 comment · Fixed by #4466
Assignees
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

Comments

@irevoire
Copy link
Member

irevoire commented Mar 13, 2024

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

  • merge changes into main
  • Update the spec
  • Add an example of the search details

Reminders when modifying the Setting API

  • Ensure the new setting route is at least tested by the test_setting_routes macro
  • Ensure Analytics are fully implemented
  • Ensure the dump serializing is consistent with the /settings route serializing, e.g., enums case can be different (camelCase in route and PascalCase in the dump)

Impacted teams

@meilisearch/docs-team

@irevoire irevoire added the performance Related to the performance in term of search/indexation speed or RAM/CPU/Disk consumption label Mar 13, 2024
@irevoire irevoire added this to the v1.8.0 milestone Mar 13, 2024
@irevoire irevoire self-assigned this Mar 13, 2024
@irevoire irevoire mentioned this issue Mar 13, 2024
3 tasks
@curquiza curquiza added the impacts docs This issue involves changes in the Meilisearch's documentation label Mar 13, 2024
@curquiza curquiza added the impacts integrations This issue involves changes in the Meilisearch's integrations label Mar 20, 2024
@curquiza
Copy link
Member

A new parameter probably coming so pinging @meilisearch/integration-team here

@meili-bors meili-bors bot closed this as completed in fc1c3f4 Mar 20, 2024
@meili-bot meili-bot added the v1.8.0 PRs/issues solved in v1.8.0 released on 2024-05-06 label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants