Work in progress: It seems like we support synonyms, split and concat words

This commit is contained in:
Clément Renault 2019-11-30 16:53:34 +01:00
parent d17d4dc5ec
commit 902625601a
No known key found for this signature in database
GPG key ID: 0151CDAB43460DAE
9 changed files with 1026 additions and 48 deletions

View file

@ -13,11 +13,11 @@ use crate::database::MainT;
use crate::error::MResult;
use crate::store;
use self::dfa::{build_dfa, build_prefix_dfa};
pub use self::dfa::{build_dfa, build_prefix_dfa};
pub use self::query_enhancer::QueryEnhancer;
use self::query_enhancer::QueryEnhancerBuilder;
pub use self::query_enhancer::QueryEnhancerBuilder;
const NGRAMS: usize = 3;
pub const NGRAMS: usize = 3;
pub struct AutomatonProducer {
automatons: Vec<AutomatonGroup>,
@ -145,7 +145,7 @@ pub fn normalize_str(string: &str) -> String {
string
}
fn split_best_frequency<'a>(
pub fn split_best_frequency<'a>(
reader: &heed::RoTxn<MainT>,
word: &'a str,
postings_lists_store: store::PostingsLists,