You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
CSV Content-Type — Add support for the boolean type in CSV (#228)
* add support for the boolean type in csv
* fix a typo
* Update text/0028-indexing-csv.md
---------
Co-authored-by: Guillaume Mourier <[email protected]>
Copy file name to clipboardExpand all lines: text/0028-indexing-csv.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,9 +38,9 @@ While there's [RFC 4180](https://tools.ietf.org/html/rfc4180) as a try to add a
38
38
39
39
- CSV data format needs to contain a first line representing the list of attributes with the optionally chosen type separated from the attribute name by `:` character. The type is case insensitive.
40
40
41
-
> An attribute can be specificed with two types: `string` or `number`. A missing type will be interpreted as a `string` by default.
41
+
> An attribute can be specificed with three types: `string`, `boolean` or `number`. A missing type will be interpreted as a `string` by default.
- The following CSV lines will represent a document for Meilisearch.
46
46
- A `,` character must separate each cell.
@@ -57,14 +57,15 @@ While there's [RFC 4180](https://tools.ietf.org/html/rfc4180) as a try to add a
57
57
##### `null` value
58
58
59
59
- If a field is of type `string`, then an empty cell is considered as a `null` value (e.g. `,,`), anything else is turned into a string value (e.g. `, ,` is a single whitespace string)
60
-
- If a field is of type `number`, when the trimmed field is empty, it's considered as a `null` value (e.g. `,,``, ,`); otherwise Meilisearch try to parse the number.
60
+
- If a field is of type `number`, when the trimmed field is empty, it's considered as a `null` value (e.g. `,,``, ,`); otherwise, Meilisearch tries to parse the number.
61
+
- If a field is of type `boolean`, when the trimmed field is empty, it's considered as a `null` value (e.g. `,,``, ,`); otherwise, Meilisearch tries to parse the boolean as either `true` or `false`.
0 commit comments