Merge pull request #1299 from saroh/1232-doc-lint

doc lint for errors and aggregations
This commit is contained in:
PSeitz
2022-03-02 09:22:07 +01:00
committed by GitHub
2 changed files with 11 additions and 11 deletions

View File

@@ -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

View File

@@ -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<PathBuf>,
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<String>),
/// 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),
}