mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-04 17:40:42 +00:00
23 lines
517 B
Rust
23 lines
517 B
Rust
use Result;
|
|
use collector::Collector;
|
|
use core::searcher::Searcher;
|
|
use common::TimerTree;
|
|
use DocAddress;
|
|
use query::Explanation;
|
|
|
|
pub trait Query {
|
|
|
|
fn search<C: Collector>(
|
|
&self,
|
|
searcher: &Searcher,
|
|
collector: &mut C) -> Result<TimerTree>;
|
|
|
|
fn explain(
|
|
&self,
|
|
searcher: &Searcher,
|
|
doc_address: &DocAddress) -> Result<Explanation> {
|
|
// TODO check that the document is there or return an error.
|
|
panic!("Not implemented");
|
|
}
|
|
}
|