mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-26 21:20:40 +00:00
explanation kind of working in an ugly way.
This commit is contained in:
@@ -8,6 +8,9 @@ use schema::Schema;
|
||||
use schema::{Term, Field};
|
||||
use analyzer::SimpleTokenizer;
|
||||
use analyzer::StreamingIterator;
|
||||
use DocAddress;
|
||||
use Score;
|
||||
use query::Explanation;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum ParsingError {
|
||||
@@ -43,8 +46,16 @@ impl Query for StandardQuery {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn explain(
|
||||
&self,
|
||||
searcher: &Searcher,
|
||||
doc_address: &DocAddress) -> Result<Option<(Score, Explanation)>, io::Error> {
|
||||
match self {
|
||||
&StandardQuery::MultiTerm(ref q) => q.explain(searcher, doc_address)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn compute_terms(field: Field, text: &str) -> Vec<Term> {
|
||||
let tokenizer = SimpleTokenizer::new();
|
||||
|
||||
Reference in New Issue
Block a user