Implement the DocumentUpdate batch operation

This commit is contained in:
Kerollmops 2022-09-29 12:04:58 +02:00 committed by Clément Renault
parent 78922a7c67
commit e84119fc75
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
4 changed files with 51 additions and 7 deletions

View file

@ -40,6 +40,17 @@ impl ErrorCode for IndexError {
}
}
impl ErrorCode for &IndexError {
fn error_code(&self) -> Code {
match self {
IndexError::Internal(_) => Code::Internal,
IndexError::DocumentNotFound(_) => Code::DocumentNotFound,
IndexError::Facet(e) => e.error_code(),
IndexError::Milli(e) => MilliError(e).error_code(),
}
}
}
impl From<milli::UserError> for IndexError {
fn from(error: milli::UserError) -> IndexError {
IndexError::Milli(error.into())

View file

@ -9,7 +9,6 @@ use fst::IntoStreamer;
use milli::heed::{CompactionOption, EnvOpenOptions, RoTxn};
use milli::update::{IndexerConfig, Setting};
use milli::{obkv_to_json, FieldDistribution, DEFAULT_VALUES_PER_FACET};
use serde::{Deserialize, Serialize};
use serde_json::{Map, Value};
use time::OffsetDateTime;