mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Merge #5144
5144: Exactly 512 bytes docid fails r=Kerollmops a=dureuill # Pull Request ## Related issue Fixes #5050 ## What does this PR do? - Return a user error rather than an internal one for docids of exactly 512 bytes - Fix up error message to indicate that exactly 512 bytes long docids are not supported. - Fix up error message to reflect that index uids are actually limited to 400 bytes in length ## Impact - Impacts docs: - update [this paragraph](https://www.meilisearch.com/docs/learn/resources/known_limitations#length-of-primary-key-values) to say 511 bytes instead of 512 Co-authored-by: Louis Dureuil <louis@meilisearch.com>
This commit is contained in:
commit
eaabc1af2f
7 changed files with 90 additions and 12 deletions
|
@ -1,12 +1,13 @@
|
|||
use std::fmt::Display;
|
||||
|
||||
use crate::TaskId;
|
||||
use meilisearch_types::batches::BatchId;
|
||||
use meilisearch_types::error::{Code, ErrorCode};
|
||||
use meilisearch_types::tasks::{Kind, Status};
|
||||
use meilisearch_types::{heed, milli};
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::TaskId;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub enum DateField {
|
||||
BeforeEnqueuedAt,
|
||||
|
@ -103,7 +104,7 @@ pub enum Error {
|
|||
)]
|
||||
InvalidTaskCanceledBy { canceled_by: String },
|
||||
#[error(
|
||||
"{index_uid} is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_), and can not be more than 512 bytes."
|
||||
"{index_uid} is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_), and can not be more than 400 bytes."
|
||||
)]
|
||||
InvalidIndexUid { index_uid: String },
|
||||
#[error("Task `{0}` not found.")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue