mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-04 16:22:55 +00:00
Compare commits
2 Commits
optional_c
...
0.15.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6847af74ad | ||
|
|
5baa91fdf3 |
@@ -1,3 +1,7 @@
|
|||||||
|
Tantivy 0.15.2
|
||||||
|
========================
|
||||||
|
- Major bugfix. DocStore still panics when a deleted doc is at the beginning of a block. (@appaquet) #1088
|
||||||
|
|
||||||
Tantivy 0.15.1
|
Tantivy 0.15.1
|
||||||
=========================
|
=========================
|
||||||
- Major bugfix. DocStore panics when first block is deleted. (@appaquet) #1077
|
- Major bugfix. DocStore panics when first block is deleted. (@appaquet) #1077
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tantivy"
|
name = "tantivy"
|
||||||
version = "0.15.1"
|
version = "0.15.2"
|
||||||
authors = ["Paul Masurel <paul.masurel@gmail.com>"]
|
authors = ["Paul Masurel <paul.masurel@gmail.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
categories = ["database-implementations", "data-structures"]
|
categories = ["database-implementations", "data-structures"]
|
||||||
|
|||||||
@@ -133,12 +133,22 @@ pub mod tests {
|
|||||||
format!("Doc {}", i)
|
format!("Doc {}", i)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (_, doc) in store.iter(Some(&delete_bitset)).enumerate() {
|
for (_, doc) in store.iter(Some(&delete_bitset)).enumerate() {
|
||||||
let doc = doc?;
|
let doc = doc?;
|
||||||
let title_content = doc.get_first(field_title).unwrap().text().unwrap();
|
let title_content = doc.get_first(field_title).unwrap().text().unwrap();
|
||||||
if !title_content.starts_with("Doc ") {
|
if !title_content.starts_with("Doc ") {
|
||||||
panic!("unexpected title_content {}", title_content);
|
panic!("unexpected title_content {}", title_content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let id = title_content
|
||||||
|
.strip_prefix("Doc ")
|
||||||
|
.unwrap()
|
||||||
|
.parse::<u32>()
|
||||||
|
.unwrap();
|
||||||
|
if delete_bitset.is_deleted(id) {
|
||||||
|
panic!("unexpected deleted document {}", id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -171,11 +171,6 @@ impl StoreReader {
|
|||||||
.filter_map(move |doc_id| {
|
.filter_map(move |doc_id| {
|
||||||
// filter_map is only used to resolve lifetime issues between the two closures on
|
// filter_map is only used to resolve lifetime issues between the two closures on
|
||||||
// the outer variables
|
// the outer variables
|
||||||
let alive = delete_bitset.map_or(true, |bitset| bitset.is_alive(doc_id));
|
|
||||||
if !alive {
|
|
||||||
// we keep the number of skipped documents to move forward in the map block
|
|
||||||
num_skipped += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check move to next checkpoint
|
// check move to next checkpoint
|
||||||
if doc_id >= curr_checkpoint.as_ref().unwrap().doc_range.end {
|
if doc_id >= curr_checkpoint.as_ref().unwrap().doc_range.end {
|
||||||
@@ -187,6 +182,7 @@ impl StoreReader {
|
|||||||
num_skipped = 0;
|
num_skipped = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let alive = delete_bitset.map_or(true, |bitset| bitset.is_alive(doc_id));
|
||||||
if alive {
|
if alive {
|
||||||
let ret = Some((curr_block.clone(), num_skipped, reset_block_pos));
|
let ret = Some((curr_block.clone(), num_skipped, reset_block_pos));
|
||||||
// the map block will move over the num_skipped, so we reset to 0
|
// the map block will move over the num_skipped, so we reset to 0
|
||||||
@@ -194,6 +190,8 @@ impl StoreReader {
|
|||||||
reset_block_pos = false;
|
reset_block_pos = false;
|
||||||
ret
|
ret
|
||||||
} else {
|
} else {
|
||||||
|
// we keep the number of skipped documents to move forward in the map block
|
||||||
|
num_skipped += 1;
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user