Skip to content

Commit

Permalink
fixed stopwords elimination, flaky build test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfran committed Jan 15, 2024
1 parent 0ac456f commit 6484a9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/index_unit_test/docs/3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
man world
4 changes: 2 additions & 2 deletions src/index/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use super::{
};

const PROGRESS_STYLE: &str =
" Documents per second: {per_sec:<3}\n\n [{elapsed_precise}] [{bar:50}] {pos}/{len} ({eta})";
"Documents per second: {per_sec:<3}\n\n[{elapsed_precise}] [{bar:50}] {pos}/{len} [{eta_precise}]";
const PROGRESS_CHARS: &str = "=> ";

const CUTOFF_THRESHOLD: f64 = 0.8;
Expand Down Expand Up @@ -93,7 +93,7 @@ fn build_in_memory(input_dir: &str, tokenizer: &Tokenizer, stemmer: &Stemmer) ->

let final_postings = postings.into_inner().unwrap();

let frequency_threshold = (final_postings.len() as f64 * CUTOFF_THRESHOLD) as u32;
let frequency_threshold = (doc_id_mutex.into_inner().unwrap() as f64 * CUTOFF_THRESHOLD) as u32;

let sorted_term_index_map: BTreeMap<String, usize> = term_index_map
.into_inner()
Expand Down

0 comments on commit 6484a9d

Please sign in to comment.