Skip to content
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

text/csv bulk insert endpoint does not support booleans #3572

Closed
samcfinan opened this issue Mar 8, 2023 · 0 comments · Fixed by #3576
Closed

text/csv bulk insert endpoint does not support booleans #3572

samcfinan opened this issue Mar 8, 2023 · 0 comments · Fixed by #3576
Assignees
Labels
enhancement New feature or improvement impacts docs This issue involves changes in the Meilisearch's documentation v1.2.0 PRs/issues solved in v1.2.0 released on 2023-06-05
Milestone

Comments

@samcfinan
Copy link

samcfinan commented Mar 8, 2023

Describe the bug
The endpoint to bulk insert documents fails to parse boolean properties when uploading a CSV. The type annotation is appended to the key name and the value is a string.

To Reproduce
Steps to reproduce the behavior:

  1. POST /indexes/:indexUID/documents?primaryKey=id with the following body and a Content-Type of text/csv:
"id:number","active:boolean"
899767,true
  1. Fetch documents via GET /indexes/:indexUID/documents
  2. Note that the active key will be parsed as active:boolean with the value as a string.

Expected behavior
Expecting Meilisearch to use the boolean type annotation when creating the document.

Meilisearch version: [e.g. v1.0.2]

Thanks everyone! Meilisearch is an excellent product.


Edit by the meilisearch team

Fixed by #3576
The associated spec is here; meilisearch/specifications#228

@meilisearch/docs-team Currently, we’re not super clear on the types we can specify in a csv document; https://docs.meilisearch.com/learn/core_concepts/documents.html#csv
With this addition, I guess it could be the occasion to list all the available types (string, number, boolean, null can’t be specified, but will happens if a field is empty)

@irevoire irevoire added the enhancement New feature or improvement label Mar 9, 2023
@irevoire irevoire added this to the v1.2.0 milestone Mar 9, 2023
@irevoire irevoire added the impacts docs This issue involves changes in the Meilisearch's documentation label Mar 9, 2023
@irevoire irevoire self-assigned this Mar 9, 2023
@bors bors bot closed this as completed in 70c906d Mar 14, 2023
@meili-bot meili-bot added the v1.2.0 PRs/issues solved in v1.2.0 released on 2023-06-05 label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement impacts docs This issue involves changes in the Meilisearch's documentation v1.2.0 PRs/issues solved in v1.2.0 released on 2023-06-05
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants