milli icon indicating copy to clipboard operation
milli copied to clipboard

`validate_document_id` function trims the id, but maybe shouldn't

Open loiclec opened this issue 3 years ago • 2 comments

See: https://github.com/meilisearch/milli/pull/561#discussion_r925394083

So a document such as:

{
    "id" : "  hello  "
}

will have the id:

"hello"

but according to the Meilisearch documentation, spaces are not allowed in document ids. So one could argue that the document should not be accepted in the first place.

loiclec avatar Jul 20 '22 14:07 loiclec

And thus the documents

{ "id": " hello", ... }
{ "id": "hello ", ... }

Will be merged together, which is clearly a bug

irevoire avatar Jul 25 '22 11:07 irevoire

I've created https://github.com/meilisearch/meilisearch/issues/2640 to track it for the sprint. Feel free to close this issue in favor of this one if you prefer

curquiza avatar Jul 27 '22 12:07 curquiza

Closed in favor of https://github.com/meilisearch/meilisearch/issues/2640

curquiza avatar Jan 16 '23 15:01 curquiza