Enable the client to specify a custom csv delimiter for parsing documents#2803
Enable the client to specify a custom csv delimiter for parsing documents#2803MixusMinimax wants to merge 2 commits intomeilisearch:mainfrom
Conversation
|
Hello @MixusMinimax thanks for your PR, since it impacts the product we need to discuss with the team first, and we will review it as soon as possible 😄 |
|
For traceability, more information about the state of this PR here: #2806 (comment) 😇 |
|
Hi! Update: Ignore this, this PR is replaced by #3505 |
|
Hello @MixusMinimax |
|
No worries, thank you! |
Pull Request
What does this PR do?
Fixes #2806
This PR adds the ability to specify custom csv delimiters, which I think is a very common use case, especially with large amounts of pre-existing data.
Description
In
meilisearch-lib, I added au8parameter to theDocumentAdditionFormat::Csvdocument type.In
meilisearch-http, I added the fieldpub csv_delimiter: Option<char>,toUpdateDocumentsQuery(the actual query parameter is in camelCase thanks to serde:csvDelimiter)The default delimiter is the comma (44), just like before. For example, the query for data delimited with semicolons:
cargo testsucceeded on my system, and I was able to add documents using different delimiters using postman.PR checklist
Please check if your PR fulfills the following requirements: