mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-27 13:40:49 +00:00
small changes to doc comments
This commit is contained in:
@@ -5,13 +5,13 @@ use SegmentReader;
|
||||
use SegmentLocalId;
|
||||
|
||||
/// `CountCollector` collector only counts how many
|
||||
/// document are matching the query.
|
||||
/// documents match the query.
|
||||
pub struct CountCollector {
|
||||
count: usize,
|
||||
}
|
||||
|
||||
impl CountCollector {
|
||||
/// Returns the count of document that where
|
||||
/// Returns the count of documents that were
|
||||
/// collected.
|
||||
pub fn count(&self,) -> usize {
|
||||
self.count
|
||||
|
||||
@@ -96,7 +96,7 @@ pub use postings::SegmentPostingsOption;
|
||||
|
||||
|
||||
/// u32 identifying a document within a segment.
|
||||
/// Document gets their doc id assigned incrementally,
|
||||
/// Documents have their doc id assigned incrementally,
|
||||
/// as they are added in the segment.
|
||||
pub type DocId = u32;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use std::borrow::BorrowMut;
|
||||
use std::cmp::Ordering;
|
||||
|
||||
|
||||
/// Expressed the outcome of a call to `DocSet`'s `.skip_next(...)`.
|
||||
/// Expresses the outcome of a call to `DocSet`'s `.skip_next(...)`.
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
pub enum SkipResult {
|
||||
/// target was in the docset
|
||||
@@ -24,7 +24,7 @@ pub trait DocSet {
|
||||
/// element.
|
||||
fn advance(&mut self,) -> bool;
|
||||
|
||||
/// After skipping position, the iterator in such a way `.doc()`
|
||||
/// After skipping, position the iterator in such a way `.doc()`
|
||||
/// will return a value greater or equal to target.
|
||||
///
|
||||
/// SkipResult expresses whether the `target value` was reached, overstepped,
|
||||
@@ -97,4 +97,4 @@ impl<'a, TDocSet: DocSet> DocSet for &'a mut TDocSet {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ use common::HasLen;
|
||||
/// as well as the list of term positions.
|
||||
///
|
||||
/// Its main implementation is `SegmentPostings`,
|
||||
/// but some other implementation mocking SegmentPostings exists,
|
||||
/// in order to help merging segment or for testing.
|
||||
/// but other implementations mocking SegmentPostings exists,
|
||||
/// in order to help merging segments or for testing.
|
||||
pub trait Postings: DocSet {
|
||||
/// Returns the term frequency
|
||||
fn term_freq(&self,) -> u32;
|
||||
|
||||
@@ -29,7 +29,7 @@ pub enum ParsingError {
|
||||
|
||||
/// Tantivy's Query parser
|
||||
///
|
||||
/// The language covered by the current is extremely simple.
|
||||
/// The language covered by the current parser is extremely simple.
|
||||
///
|
||||
/// * simple terms: "e.g.: `Barack Obama` are simply analyzed using
|
||||
/// tantivy's `StandardTokenizer`, hence becoming `["barack", "obama"]`.
|
||||
@@ -44,7 +44,7 @@ pub enum ParsingError {
|
||||
///
|
||||
/// This behavior is slower, but is not a bad idea if the user is sorting
|
||||
/// by relevance : The user typically just scans through the first few
|
||||
/// documents in order of decreasing relevance and will stop when the document
|
||||
/// documents in order of decreasing relevance and will stop when the documents
|
||||
/// are not relevant anymore.
|
||||
/// Making it possible to make this behavior customizable is tracked in
|
||||
/// [issue #27](https://github.com/fulmicoton/tantivy/issues/27).
|
||||
@@ -135,9 +135,9 @@ impl QueryParser {
|
||||
/// Parse a query
|
||||
///
|
||||
/// Note that `parse_query` returns an error if the input
|
||||
/// not a valid query.
|
||||
/// is not a valid query.
|
||||
///
|
||||
/// There is currently no lenient mode for the query parse
|
||||
/// There is currently no lenient mode for the query parser
|
||||
/// which makes it a bad choice for a public/broad user search engine.
|
||||
///
|
||||
/// Implementing a lenient mode for this query parser is tracked
|
||||
|
||||
Reference in New Issue
Block a user