explanation kind of working in an ugly way.

This commit is contained in:
Paul Masurel
2016-08-05 12:02:13 +09:00
parent a9ae49ab1e
commit 140f6fd2b4
19 changed files with 322 additions and 92 deletions

View File

@@ -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();