Skip to content

[Bug 🐞] Full-Text Search is incorrectly allowed on List[str] fields /w max_items #702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
XChikuX opened this issue Jun 2, 2025 · 0 comments

Comments

@XChikuX
Copy link

XChikuX commented Jun 2, 2025

The Bug:

When pydantic's max_items attribute is given a value.

interests: list[str] = Field(
    ...,
    full_text_search=True,
    max_items=10,
    max_length=20,
    title="Interests",
    description="List of interests. Upto 10 items, 20 character max",
)

redis-om silently passes.

What should Happen:

favorites: list[str] = Field(
    ...,
    full_text_search=True,
    title="Favorites",
    description="List of user IDs that this user has favorited",
)

OUTPUT: aredis_om.model.model.RedisModelError: List and tuple fields cannot be indexed for full-text search. Problem field: favorites. See docs: TODO

Environment:
python = 3.12
redis-om = 0.3.3
pydantic = v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant