fix attributes to retrieve bug

This commit is contained in:
mpostma
2020-12-10 15:57:19 +01:00
parent 7a27f9b610
commit 2bd5d2474e
2 changed files with 3 additions and 4 deletions

View File

@ -193,9 +193,7 @@ impl<'a> SearchBuilder<'a> {
.index
.document(reader, Some(&all_attributes), doc.id)
.map_err(|e| Error::retrieve_document(doc.id.0, e))?
.ok_or(Error::internal(
"Impossible to retrieve the document; Corrupted data",
))?;
.unwrap_or_default();
let mut formatted = document.iter()
.filter(|(key, _)| all_formatted.contains(key.as_str()))