Skip to content

Commit e53b5f7

Browse files
committed
Add check for content type if csv delimiter is used
1 parent a221f94 commit e53b5f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

meilisearch/index.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ def add_documents_raw(
506506
The type of document. Type available: 'csv', 'json', 'jsonl'.
507507
csv_delimiter:
508508
One ASCII character used to customize the delimiter for CSV.
509+
Note: The csv delimiter can only be used with the Content-Type text/csv.
509510
510511
Returns
511512
-------
@@ -518,7 +519,6 @@ def add_documents_raw(
518519
MeiliSearchApiError
519520
An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors
520521
"""
521-
522522
url = self._build_url(primary_key=primary_key, csv_delimiter=csv_delimiter)
523523
response = self.http.post(url, str_documents, content_type)
524524
return TaskInfo(**response)
@@ -653,6 +653,7 @@ def update_documents_raw(
653653
The type of document. Type available: 'csv', 'json', 'jsonl'
654654
csv_delimiter:
655655
One ASCII character used to customize the delimiter for CSV.
656+
Note: The csv delimiter can only be used with the Content-Type text/csv.
656657
657658
Returns
658659
-------

0 commit comments

Comments
 (0)