Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Adrien Guillo <[email protected]>
  • Loading branch information
fulmicoton and guilload authored Jun 27, 2024
1 parent 263bdf6 commit 474e587
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion quickwit/quickwit-doc-mapper/src/doc_mapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub trait DocMapper: Send + Sync + Debug + DynClone + 'static {
/// Returns the unique identifier of the doc mapping.
fn doc_mapping_uid(&self) -> DocMappingUid;

/// Validate a JSON object according to the doc mapper.
/// Validates a JSON object according to the doc mapper.
fn validate_json_obj(&self, json_obj: &JsonObject) -> Result<(), DocParsingError>;

/// Transforms a JSON object into a tantivy [`Document`] according to the rules
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-ingest/src/ingest_v2/doc_mapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn validate_doc_batch_impl(
parse_failures.push(parse_failure);
continue;
};
if let Err(error) = doc_mapper.doc_from_json_obj(json_obj, doc.len() as u64) {
if let Err(error) = doc_mapper.validate_json_obj(&json_obj) {
let parse_failure = ParseFailure {
doc_uid: Some(doc_uid),
reason: ParseFailureReason::InvalidSchema as i32,
Expand Down

0 comments on commit 474e587

Please sign in to comment.