mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Add deadline of 3 seconds to embedding requests made in the context of hybrid search
This commit is contained in:
parent
3753f87fd8
commit
37a4fd7f99
7 changed files with 81 additions and 29 deletions
|
@ -796,8 +796,10 @@ fn prepare_search<'t>(
|
|||
let span = tracing::trace_span!(target: "search::vector", "embed_one");
|
||||
let _entered = span.enter();
|
||||
|
||||
let deadline = std::time::Instant::now() + std::time::Duration::from_secs(10);
|
||||
|
||||
embedder
|
||||
.embed_one(query.q.clone().unwrap())
|
||||
.embed_one(query.q.clone().unwrap(), Some(deadline))
|
||||
.map_err(milli::vector::Error::from)
|
||||
.map_err(milli::Error::from)?
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue