From 5c8cf6bda09655252405b7410d3c57b5f5cc0c9a Mon Sep 17 00:00:00 2001 From: saroh <325288+saroh@users.noreply.github.com> Date: Thu, 16 Jun 2022 23:30:27 +0200 Subject: [PATCH] lint crate doc --- src/core/index.rs | 5 ++--- src/core/index_meta.rs | 2 +- src/core/segment_reader.rs | 2 +- src/docset.rs | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/core/index.rs b/src/core/index.rs index 2b9801770f..fbb08a1e03 100644 --- a/src/core/index.rs +++ b/src/core/index.rs @@ -232,7 +232,7 @@ impl Index { } /// Replace the default single thread search executor pool - /// by a thread pool with a given number of threads. + /// by a thread pool with as many threads as there are CPUs on the system. pub fn set_default_multithread_executor(&mut self) -> crate::Result<()> { let default_num_threads = num_cpus::get(); self.set_multithread_executor(default_num_threads) @@ -366,8 +366,7 @@ impl Index { /// Create a `IndexReader` for the given index. /// /// Most project should create at most one reader for a given index. - /// This method is typically called only once per `Index` instance, - /// over the lifetime of most problem. + /// This method is typically called only once per `Index` instance. pub fn reader_builder(&self) -> IndexReaderBuilder { IndexReaderBuilder::new(self.clone()) } diff --git a/src/core/index_meta.rs b/src/core/index_meta.rs index 8cd9429302..f8d3dd34ab 100644 --- a/src/core/index_meta.rs +++ b/src/core/index_meta.rs @@ -270,7 +270,7 @@ impl Default for IndexSettings { /// Settings to presort the documents in an index /// -/// Presorting documents can greatly performance +/// Presorting documents can greatly improve performance /// in some scenarios, by applying top n /// optimizations. #[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)] diff --git a/src/core/segment_reader.rs b/src/core/segment_reader.rs index f41a7caa1c..dab64d8abd 100644 --- a/src/core/segment_reader.rs +++ b/src/core/segment_reader.rs @@ -215,7 +215,7 @@ impl SegmentReader { /// term dictionary associated to a specific field, /// and opening the posting list associated to any term. /// - /// If the field is marked as index, a warn is logged and an empty `InvertedIndexReader` + /// If the field is not marked as index, a warn is logged and an empty `InvertedIndexReader` /// is returned. /// Similarly if the field is marked as indexed but no term has been indexed for the given /// index. an empty `InvertedIndexReader` is returned (but no warning is logged). diff --git a/src/docset.rs b/src/docset.rs index e4cb4ad69a..be47aebea5 100644 --- a/src/docset.rs +++ b/src/docset.rs @@ -24,7 +24,6 @@ pub trait DocSet: Send { /// /// Calling `.advance()` on a terminated DocSet should be supported, and TERMINATED should /// be returned. - /// TODO Test existing docsets. fn advance(&mut self) -> DocId; /// Advances the DocSet forward until reaching the target, or going to the