fix: clippy warnings in CodeSearchSchema
parent
27ed9c2cc4
commit
3600ef77fc
|
|
@ -5,8 +5,8 @@ use tantivy::{
|
|||
Index, Term,
|
||||
};
|
||||
|
||||
pub static CODE_TOKENIZER: &str = "code";
|
||||
pub static IDENTIFIER_TOKENIZER: &str = "identifier";
|
||||
static CODE_TOKENIZER: &str = "code";
|
||||
static IDENTIFIER_TOKENIZER: &str = "identifier";
|
||||
|
||||
pub fn register_tokenizers(index: &Index) {
|
||||
let code_tokenizer = TextAnalyzer::builder(RegexTokenizer::new(r"(?:\w+)").unwrap())
|
||||
|
|
@ -71,6 +71,12 @@ impl CodeSearchSchema {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for CodeSearchSchema {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl CodeSearchSchema {
|
||||
pub fn language_query(&self, language: &str) -> Box<TermQuery> {
|
||||
Box::new(TermQuery::new(
|
||||
|
|
|
|||
Loading…
Reference in New Issue