Remove the found documents from the candidates list

This commit is contained in:
Kerollmops 2020-06-24 15:00:26 +02:00
parent 50169b9798
commit 1c7a9a4132
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -242,6 +242,11 @@ impl Index {
} }
} }
// We achieve to find valid documents ids so we remove them from the candidate list.
for (_, docids) in &mut words_attributes_docids {
docids.difference_with(&same_proximity_union);
}
documents.push(same_proximity_union); documents.push(same_proximity_union);
// We remove the double occurences of documents. // We remove the double occurences of documents.