Introduce a basic version of the InternalError struct

This commit is contained in:
Kerollmops 2021-06-09 17:05:46 +02:00
parent d2b1ecc885
commit 23fcf7920e
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 43 additions and 0 deletions

42
milli/src/error.rs Normal file
View File

@ -0,0 +1,42 @@
use std::io;
use crate::{DocumentId, FieldId};
pub enum Error {
InternalError(InternalError),
IoError(io::Error),
UserError(UserError),
}
pub enum InternalError {
DatabaseMissingEntry(DatabaseMissingEntry),
FieldIdMapMissingEntry(FieldIdMapMissingEntry),
IndexingMergingKeys(IndexingMergingKeys),
}
pub enum IndexingMergingKeys {
DocIdWordPosition,
Document,
MainFstDeserialization,
WordLevelPositionDocids,
WordPrefixLevelPositionDocids,
}
pub enum FieldIdMapMissingEntry {
DisplayedFieldId { field_id: FieldId },
DisplayedFieldName { field_name: String },
FacetedFieldName { field_name: String },
FilterableFieldName { field_name: String },
SearchableFieldName { field_name: String },
}
pub enum DatabaseMissingEntry {
DocumentId { internal_id: DocumentId },
FacetValuesDocids,
IndexCreationTime,
IndexUpdateTime,
}
pub enum UserError {
}

View File

@ -1,6 +1,7 @@
#[macro_use] extern crate pest_derive;
mod criterion;
mod error;
mod external_documents_ids;
mod fields_ids_map;
mod search;