From de2cba6d1ed9c2ba67aab093fb21d4b6d6d99914 Mon Sep 17 00:00:00 2001 From: Saroh <325288+saroh@users.noreply.github.com> Date: Tue, 1 Mar 2022 20:13:59 +0100 Subject: [PATCH 1/2] error definitions --- src/error.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/error.rs b/src/error.rs index 25b5989cc..f71939a50 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,4 +1,4 @@ -//! Definition of Tantivy's error and result. +//! Definition of Tantivy's errors and results. use std::path::PathBuf; use std::sync::PoisonError; @@ -14,7 +14,7 @@ use crate::{query, schema}; /// Represents a `DataCorruption` error. /// -/// When facing data corruption, tantivy actually panic or return this error. +/// When facing data corruption, tantivy actually panics or returns this error. pub struct DataCorruption { filepath: Option, comment: String, @@ -61,10 +61,10 @@ pub enum TantivyError { /// Failed to open a file for write. #[error("Failed to open file for write: '{0:?}'")] OpenWriteError(#[from] OpenWriteError), - /// Index already exists in this directory + /// Index already exists in this directory. #[error("Index already exists")] IndexAlreadyExists, - /// Failed to acquire file lock + /// Failed to acquire file lock. #[error("Failed to acquire Lockfile: {0:?}. {1:?}")] LockFailure(LockError, Option), /// IO Error. @@ -82,19 +82,19 @@ pub enum TantivyError { /// Invalid argument was passed by the user. #[error("An invalid argument was passed: '{0}'")] InvalidArgument(String), - /// An Error happened in one of the thread. + /// An Error occurred in one of the threads. #[error("An error occurred in a thread: '{0}'")] ErrorInThread(String), - /// An Error appeared related to opening or creating a index. + /// An Error occurred related to opening or creating a index. #[error("Missing required index builder argument when open/create index: '{0}'")] IndexBuilderMissingArgument(&'static str), - /// An Error appeared related to the schema. + /// An Error occurred related to the schema. #[error("Schema error: '{0}'")] SchemaError(String), - /// System error. (e.g.: We failed spawning a new thread) + /// System error. (e.g.: We failed spawning a new thread). #[error("System error.'{0}'")] SystemError(String), - /// Index incompatible with current version of tantivy + /// Index incompatible with current version of Tantivy. #[error("{0:?}")] IncompatibleIndex(Incompatibility), } From 1cd2434a323830a658c87ade1396106c710d854c Mon Sep 17 00:00:00 2001 From: Saroh <325288+saroh@users.noreply.github.com> Date: Tue, 1 Mar 2022 20:37:48 +0100 Subject: [PATCH 2/2] fix(aggregations) Readme --- src/aggregation/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aggregation/README.md b/src/aggregation/README.md index 938006962..054293dd8 100644 --- a/src/aggregation/README.md +++ b/src/aggregation/README.md @@ -11,10 +11,10 @@ Tantivy's aggregations have been designed to mimic the The code is organized in submodules: -##bucket +## bucket Contains all bucket aggregations, like range aggregation. These bucket aggregations group documents into buckets and can contain sub-aggegations. -##metric +## metric Contains all metric aggregations, like average aggregation. Metric aggregations do not have sub aggregations. #### agg_req