diff --git a/meilisearch-types/src/document_formats.rs b/meilisearch-types/src/document_formats.rs index b0411250e..4b9d59462 100644 --- a/meilisearch-types/src/document_formats.rs +++ b/meilisearch-types/src/document_formats.rs @@ -155,7 +155,8 @@ pub fn read_csv(input: &File, output: impl io::Write, delimiter: u8) -> Result = headers.iter().map(parse_csv_header).collect(); - let mut object: Map<_, _> = headers.iter().map(|k| (k.to_string(), Value::Null)).collect(); + let mut object: Map<_, _> = + typed_fields.iter().map(|(k, _)| (k.to_string(), Value::Null)).collect(); let mut line = 0; let mut record = csv::StringRecord::new();