Skip to content

[Enhance]: Relax collection, field, and document ID name validation #395

@JalinWang

Description

@JalinWang

Affected Component

DB

Current Behavior

The current name validation rules are very restrictive:

const std::regex COLLECTION_NAME_REGEX("^[a-zA-Z0-9_-]{3,64}$");

const std::regex FIELD_NAME_REGEX("^[a-zA-Z0-9_-]{1,32}$");

const std::regex DOC_PK_REGEX("^[a-zA-Z0-9_!@#$%+=.-]{1,64}$");

I don't see enough reasons to have such restrictions.

Image

Desired Improvement

Lifting or relaxing these restrictions, or making them configurable, for:

  • collection names
  • field names
  • document primary keys / IDs

A more permissive validation rule, or a user-configurable validator, would make Zvec easier to adopt in heterogeneous environments.

Impact

  • Better compatibility with existing datasets and external identifiers
  • Easier migration from other storage systems
  • Reduced need for application-side name rewriting or ID normalization
  • Less friction when integrating Zvec with multi-language tooling

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions