Skip looking at connections for proximity 0

This commit is contained in:
Kerollmops 2020-06-20 13:19:03 +02:00
parent c84012d655
commit beb49b24f6
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -126,6 +126,7 @@ impl Index {
let mut runion_docids = RoaringBitmap::default();
let contains_documents = |(lword, lpos): (usize, u32), (rword, rpos): (usize, u32)| {
let proximity = best_proximity::positions_proximity(lpos, rpos);
if proximity == 0 { return false }
*intersect_cache.entry(((lword, lpos), (rword, rpos))).or_insert_with(|| {
// let (nb_words, nb_docs_intersect, lnblookups, lnbbitmaps, rnblookups, rnbbitmaps) =