Skip to content

web search done right

Fixed bug that caused some optics to match websites they shouldn't

Mikkel Denkerdcf238f4fc34
diff --git a/core/src/query/union.rs b/core/src/query/union.rs
index 6234885f..879f107d 100644
--- a/core/src/query/union.rs
+++ b/core/src/query/union.rs
@@ -94,34 +94,6 @@ impl<T: DocSet> DocSet for Union<T> {
self.docsets.peek_min().unwrap().min_doc
}
- fn seek(&mut self, target: DocId) -> DocId {
- let old_min = self.doc();
-
- if old_min > target {
- return old_min;
- }
-
- if old_min == TERMINATED {
- return TERMINATED;
- }
-
- {
- loop {
- let head = self.docsets.peek_min().unwrap();
-
- if head.min_doc != old_min || head.min_doc == target {
- break;
- }
-
- let mut head = self.docsets.peek_min_mut().unwrap();
-
- head.min_doc = head.docset.get_mut().seek(target);
- }
- }
-
- self.docsets.peek_min().unwrap().min_doc
- }
-
fn doc(&self) -> tantivy::DocId {
self.docsets
.peek_min()
diff --git a/core/src/spell/mod.rs b/core/src/spell/mod.rs
index 3b624387..69145856 100644
--- a/core/src/spell/mod.rs
+++ b/core/src/spell/mod.rs
@@ -118,7 +118,7 @@ impl Spell {
info!("Building spell correction dictionary");
let searcher = index.inverted_index.tv_searcher();
let schema = searcher.schema();
- let mut dict = DictionaryBuilder::new(100_000);
+ let mut dict = DictionaryBuilder::new(1_000_000);
#[allow(unused_assignments, unused_mut)]
let mut limit_terms: Option<usize> = None;
#[cfg(debug_assertions)]