mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
fix the error code in case of not filterable attributes on the get / delete documents by filter routes
This commit is contained in:
parent
0b38f211ac
commit
96da5130a4
4 changed files with 50 additions and 8 deletions
|
@ -540,7 +540,12 @@ fn retrieve_documents<S: AsRef<str>>(
|
|||
};
|
||||
|
||||
let candidates = if let Some(filter) = filter {
|
||||
filter.evaluate(&rtxn, index)?
|
||||
filter.evaluate(&rtxn, index).map_err(|err| match err {
|
||||
milli::Error::UserError(milli::UserError::InvalidFilter(_)) => {
|
||||
ResponseError::from_msg(err.to_string(), Code::InvalidDocumentFilter)
|
||||
}
|
||||
e => e.into(),
|
||||
})?
|
||||
} else {
|
||||
index.documents_ids(&rtxn)?
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue