-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NDJSON/CSV methods to add and update documents #238
Labels
Comments
curquiza
added
hacktoberfest
good first issue
Good for newcomers
enhancement
New feature or request
labels
Oct 19, 2021
Closed by #235 |
Sorry, my bad! |
3 tasks
bors bot
added a commit
that referenced
this issue
Oct 24, 2022
399: Implement methods for CSV and Ndjson batch adds r=brunoocasali a=karlomikus # Pull Request ## Related issue Fixes #238 ## What does this PR do? - Implements methods for batch adding of documents in csv and ndjson format ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? ## Notes This is using `preg_split` and `implode` to chunk strings by newline. Let me know if there is a better way to do this. If this is fine I can implement the rest of the methods from the issue. Co-authored-by: Karlo Mikuš <[email protected]>
bors bot
added a commit
that referenced
this issue
Oct 25, 2022
399: Implement methods for CSV and Ndjson batch adds r=brunoocasali a=karlomikus # Pull Request ## Related issue Fixes #238 ## What does this PR do? - Implements methods for batch adding of documents in csv and ndjson format ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? ## Notes This is using `preg_split` and `implode` to chunk strings by newline. Let me know if there is a better way to do this. If this is fine I can implement the rest of the methods from the issue. Co-authored-by: Karlo Mikuš <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add_documents_json
instead ofaddDocumentsJson
). Keep the already existing way of naming in this package to stay idiomatic with the language and this repository.📣 We strongly recommend doing multiple PRs to solve all the points of this issue
MeiliSearch v0.23.0 introduces two changes:
Content-type
header for every route requiring a payload (POST
andPUT
routes)Here are the expected changes to completely close the issue:
Currently, the SDKs always send
Content-Type: application/json
to every request. Only thePOST
andPUT
requests should send theContent-Type: application/json
and not theDELETE
andGET
ones.Add the following methods and 🔥 the associated tests 🔥 to ADD the documents. Depending on the format type (
csv
orndjson
) the SDK should sendContent-Type: application/x-dnjson
orContent-Type: text/csv
)addDocumentsJson(string docs, string primaryKey)
addDocumentsCsv(string docs, string primaryKey)
addDocumentsCsvInBatches(string docs, int batchSize, string primaryKey)
addDocumentsNdjson(string docs, string primaryKey)
addDocumentsNdjsonInBatches(string docs, int batchSize, string primaryKey)
Add the following methods and 🔥 the associated tests 🔥 to UPDATE the documents. Depending on the format type (
csv
orndjson
) the SDK should sendContent-Type: application/x-dnjson
orContent-Type: text/csv
)updateDocumentsJson(string docs, string primaryKey)
updateDocumentsCsv(string docs, string primaryKey)
updateDocumentsCsvInBatches(string docs, int batchSize, string primaryKey)
updateDocumentsNdjson(string docs, string primaryKey)
updateDocumentsNdjsonInBatches(string docs, int batchSize, string primaryKey)
docs
are the documents sent asString
primaryKey
is the primary key of the indexbatchSize
is the size of the batch. Example: you can send 2000 documents in raw String indocs
and ask for abatchSize
of 1000, so your documents will be sent to MeiliSearch in two batches.Example of PRs:
CSV
NDJSON
meilisearch-python#329Related to: meilisearch/integration-guides#146
If this issue is partially/completely implemented, feel free to let us know.
The text was updated successfully, but these errors were encountered: