Bail earlier when the experimental feature is not enabled

This commit is contained in:
Louis Dureuil 2024-03-28 12:06:59 +01:00
parent 466d718a05
commit 4564a38ae7
No known key found for this signature in database
4 changed files with 24 additions and 31 deletions

View file

@ -81,14 +81,13 @@ pub async fn multi_search_with_post(
})
.with_index(query_index)?;
let search_kind =
search_kind(&query, index_scheduler.get_ref(), &index).with_index(query_index)?;
let search_kind = search_kind(&query, index_scheduler.get_ref(), &index, features)
.with_index(query_index)?;
let search_result = tokio::task::spawn_blocking(move || {
perform_search(&index, query, features, search_kind)
})
.await
.with_index(query_index)?;
let search_result =
tokio::task::spawn_blocking(move || perform_search(&index, query, search_kind))
.await
.with_index(query_index)?;
search_results.push(SearchResultWithIndex {
index_uid: index_uid.into_inner(),