mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-05 01:50:42 +00:00
Uncommenting unit test
This commit is contained in:
@@ -7,7 +7,9 @@ use query::Query;
|
||||
use DocId;
|
||||
use DocAddress;
|
||||
use schema::Term;
|
||||
use datastruct::fstmap::FstMerger;
|
||||
use std::fmt;
|
||||
use postings::TermInfo;
|
||||
|
||||
|
||||
/// Holds a list of `SegmentReader`s ready for search.
|
||||
@@ -62,6 +64,18 @@ impl Searcher {
|
||||
pub fn search<C: Collector>(&self, query: &Query, collector: &mut C) -> Result<TimerTree> {
|
||||
query.search(self, collector)
|
||||
}
|
||||
|
||||
/// Returns a Stream over all of the sorted unique terms of
|
||||
/// the searcher.
|
||||
///
|
||||
/// This includes all of the fields from all of the segment_readers.
|
||||
/// See [TermIterator](struct.TermIterator.html).
|
||||
///
|
||||
/// # Warning
|
||||
/// This API is very likely to change in the future.
|
||||
pub fn terms(&self) -> FstMerger<TermInfo> {
|
||||
FstMerger::from(self.segment_readers())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ impl SegmentReader {
|
||||
}
|
||||
|
||||
/// Return the term dictionary datastructure.
|
||||
pub fn term_infos<'b>(&'b self) -> &'b FstMap<TermInfo> {
|
||||
pub fn term_infos(&self) -> &FstMap<TermInfo> {
|
||||
&self.term_infos
|
||||
}
|
||||
|
||||
@@ -227,11 +227,6 @@ impl SegmentReader {
|
||||
_ => { SegmentPostingsOption::NoFreq },
|
||||
};
|
||||
Some(self.read_postings_from_terminfo(&term_info, possible_option))
|
||||
|
||||
// SegmentPostings::from_data(term_info.doc_freq,
|
||||
// postings_data,
|
||||
// &self.delete_bitset,
|
||||
// freq_handler))
|
||||
}
|
||||
|
||||
pub fn read_postings_from_terminfo(&self,
|
||||
|
||||
Reference in New Issue
Block a user