mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 13:24:27 +01:00
fix unwrap bug
This commit is contained in:
parent
cb267b68ed
commit
5ed62dbf76
@ -370,12 +370,12 @@ where
|
|||||||
let mut documents = Vec::with_capacity(range.len());
|
let mut documents = Vec::with_capacity(range.len());
|
||||||
for raw_document in raw_documents.into_iter().skip(distinct_raw_offset) {
|
for raw_document in raw_documents.into_iter().skip(distinct_raw_offset) {
|
||||||
let filter_accepted = match &filter {
|
let filter_accepted = match &filter {
|
||||||
Some(_) => filter_map.remove(&raw_document.id).unwrap(),
|
Some(_) => filter_map.remove(&raw_document.id).unwrap_or_default(),
|
||||||
None => true,
|
None => true,
|
||||||
};
|
};
|
||||||
|
|
||||||
if filter_accepted {
|
if filter_accepted {
|
||||||
let key = key_cache.remove(&raw_document.id).unwrap();
|
let key = key_cache.remove(&raw_document.id).unwrap_or_default();
|
||||||
let distinct_accepted = match key {
|
let distinct_accepted = match key {
|
||||||
Some(key) => seen.register(key),
|
Some(key) => seen.register(key),
|
||||||
None => seen.register_without_key(),
|
None => seen.register_without_key(),
|
||||||
|
Loading…
Reference in New Issue
Block a user