fix test after rebase

This commit is contained in:
qdequele 2020-04-26 20:54:35 +02:00
parent 36c7fd0cf1
commit 99866ba484
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
5 changed files with 92 additions and 44 deletions

View file

@ -172,15 +172,9 @@ impl<'a> SearchBuilder<'a> {
let mut hits = Vec::with_capacity(self.limit);
for doc in docs {
// retrieve the content of document in kv store
let attributes: Option<HashSet<&str>> = self
.attributes_to_retrieve
.as_ref()
.map(|a| a.iter().map(|a| a.as_str()).collect());
let mut document: IndexMap<String, Value> = self
.index
.document(reader, attributes.as_ref(), doc.id)
.document(reader, Some(&all_attributes), doc.id)
.map_err(|e| ResponseError::retrieve_document(doc.id.0, e))?
.ok_or(ResponseError::internal(
"Impossible to retrieve the document; Corrupted data",