alibaba / alibaba/zvec

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

Open
#395 1 comment 0 reactions 1 assignee Assigned to @Cuiyus View on GitHub
Dominant language
C++
Stars
15.9k
Forks
998
Avg merge
4d 7h
Merged PRs (30d)
34

Description

### Affected Component

DB

### Current Behavior

The current name validation rules are very restrictive:

```c++
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.

A more clear and user-friendly message indicating what is not allowed.

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.