mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
Rename DatabaseSizeReached into MaxDatabaseSizeReached
This commit is contained in:
parent
4eda438f6f
commit
8cfe3e1ec0
@ -51,7 +51,7 @@ pub enum FieldIdMapMissingEntry {
|
|||||||
pub enum UserError {
|
pub enum UserError {
|
||||||
AttributeLimitReached,
|
AttributeLimitReached,
|
||||||
Csv(csv::Error),
|
Csv(csv::Error),
|
||||||
DatabaseSizeReached,
|
MaxDatabaseSizeReached,
|
||||||
DocumentLimitReached,
|
DocumentLimitReached,
|
||||||
FilterParsing(pest::error::Error<ParserRule>),
|
FilterParsing(pest::error::Error<ParserRule>),
|
||||||
InvalidCriterionName { name: String },
|
InvalidCriterionName { name: String },
|
||||||
@ -113,7 +113,7 @@ impl From<HeedError> for Error {
|
|||||||
|
|
||||||
match error {
|
match error {
|
||||||
HeedError::Io(error) => Error::from(error),
|
HeedError::Io(error) => Error::from(error),
|
||||||
HeedError::Mdb(MdbError::MapFull) => UserError(DatabaseSizeReached),
|
HeedError::Mdb(MdbError::MapFull) => UserError(MaxDatabaseSizeReached),
|
||||||
HeedError::Mdb(MdbError::Invalid) => UserError(InvalidStoreFile),
|
HeedError::Mdb(MdbError::Invalid) => UserError(InvalidStoreFile),
|
||||||
HeedError::Mdb(error) => InternalError(Store(error)),
|
HeedError::Mdb(error) => InternalError(Store(error)),
|
||||||
HeedError::Encoding => InternalError(Serialization(Encoding { db_name: None })),
|
HeedError::Encoding => InternalError(Serialization(Encoding { db_name: None })),
|
||||||
@ -211,7 +211,7 @@ impl fmt::Display for UserError {
|
|||||||
write!(f, "document doesn't have an identifier {}", json)
|
write!(f, "document doesn't have an identifier {}", json)
|
||||||
},
|
},
|
||||||
Self::MissingPrimaryKey => f.write_str("missing primary key"),
|
Self::MissingPrimaryKey => f.write_str("missing primary key"),
|
||||||
Self::DatabaseSizeReached => f.write_str("database size reached"),
|
Self::MaxDatabaseSizeReached => f.write_str("maximum database size reached"),
|
||||||
// TODO where can we find it instead of writing the text ourselves?
|
// TODO where can we find it instead of writing the text ourselves?
|
||||||
Self::NoSpaceLeftOnDevice => f.write_str("no space left on device"),
|
Self::NoSpaceLeftOnDevice => f.write_str("no space left on device"),
|
||||||
Self::InvalidStoreFile => f.write_str("store file is not a valid database file"),
|
Self::InvalidStoreFile => f.write_str("store file is not a valid database file"),
|
||||||
|
@ -164,7 +164,7 @@ impl FilterCondition {
|
|||||||
{
|
{
|
||||||
let mut items = item.into_inner();
|
let mut items = item.into_inner();
|
||||||
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
||||||
.map_err(UserError::FilterParsing)?;
|
.map_err(UserError::InvalidFilterAttribute)?;
|
||||||
|
|
||||||
let (lresult, _) = pest_parse(items.next().unwrap());
|
let (lresult, _) = pest_parse(items.next().unwrap());
|
||||||
let (rresult, _) = pest_parse(items.next().unwrap());
|
let (rresult, _) = pest_parse(items.next().unwrap());
|
||||||
@ -183,7 +183,7 @@ impl FilterCondition {
|
|||||||
{
|
{
|
||||||
let mut items = item.into_inner();
|
let mut items = item.into_inner();
|
||||||
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
||||||
.map_err(UserError::FilterParsing)?;
|
.map_err(UserError::InvalidFilterAttribute)?;
|
||||||
|
|
||||||
let value = items.next().unwrap();
|
let value = items.next().unwrap();
|
||||||
let (result, svalue) = pest_parse(value);
|
let (result, svalue) = pest_parse(value);
|
||||||
@ -200,7 +200,7 @@ impl FilterCondition {
|
|||||||
{
|
{
|
||||||
let mut items = item.into_inner();
|
let mut items = item.into_inner();
|
||||||
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
||||||
.map_err(UserError::FilterParsing)?;
|
.map_err(UserError::InvalidFilterAttribute)?;
|
||||||
|
|
||||||
let value = items.next().unwrap();
|
let value = items.next().unwrap();
|
||||||
let (result, _svalue) = pest_parse(value);
|
let (result, _svalue) = pest_parse(value);
|
||||||
@ -217,7 +217,7 @@ impl FilterCondition {
|
|||||||
{
|
{
|
||||||
let mut items = item.into_inner();
|
let mut items = item.into_inner();
|
||||||
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
||||||
.map_err(UserError::FilterParsing)?;
|
.map_err(UserError::InvalidFilterAttribute)?;
|
||||||
|
|
||||||
let value = items.next().unwrap();
|
let value = items.next().unwrap();
|
||||||
let (result, _svalue) = pest_parse(value);
|
let (result, _svalue) = pest_parse(value);
|
||||||
@ -234,7 +234,7 @@ impl FilterCondition {
|
|||||||
{
|
{
|
||||||
let mut items = item.into_inner();
|
let mut items = item.into_inner();
|
||||||
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
||||||
.map_err(UserError::FilterParsing)?;
|
.map_err(UserError::InvalidFilterAttribute)?;
|
||||||
|
|
||||||
let value = items.next().unwrap();
|
let value = items.next().unwrap();
|
||||||
let (result, _svalue) = pest_parse(value);
|
let (result, _svalue) = pest_parse(value);
|
||||||
@ -251,7 +251,7 @@ impl FilterCondition {
|
|||||||
{
|
{
|
||||||
let mut items = item.into_inner();
|
let mut items = item.into_inner();
|
||||||
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
let fid = field_id(fields_ids_map, filterable_fields, &mut items)
|
||||||
.map_err(UserError::FilterParsing)?;
|
.map_err(UserError::InvalidFilterAttribute)?;
|
||||||
|
|
||||||
let value = items.next().unwrap();
|
let value = items.next().unwrap();
|
||||||
let (result, _svalue) = pest_parse(value);
|
let (result, _svalue) = pest_parse(value);
|
||||||
|
Loading…
Reference in New Issue
Block a user