From e7d9db078fbbfecf2f1c393fac7ddde490994c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Wed, 11 Sep 2024 18:27:00 +0200 Subject: [PATCH] Use the right key name when convertir from CSV to NDJSON --- meilisearch-types/src/document_formats.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();