diff --git a/src/collector/count_collector.rs b/src/collector/count_collector.rs index 9eaf74165..dc1d85580 100644 --- a/src/collector/count_collector.rs +++ b/src/collector/count_collector.rs @@ -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 diff --git a/src/lib.rs b/src/lib.rs index 0f335c425..15378e025 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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; diff --git a/src/postings/docset.rs b/src/postings/docset.rs index e7fb59315..e84c56380 100644 --- a/src/postings/docset.rs +++ b/src/postings/docset.rs @@ -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 { } } - \ No newline at end of file + diff --git a/src/postings/postings.rs b/src/postings/postings.rs index e3323ae19..bffbeb876 100644 --- a/src/postings/postings.rs +++ b/src/postings/postings.rs @@ -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; diff --git a/src/query/query_parser.rs b/src/query/query_parser.rs index f15196a06..89876825d 100644 --- a/src/query/query_parser.rs +++ b/src/query/query_parser.rs @@ -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