配置 SSOT(TOML + .env) 统一错误契约 Auth 与事务边界 Redis / Celery 可靠性:业务 Redis(DB/0)与 Celery broker/backend(DB/1)显式拆分;连接池、sync client 可观测性(OpenTelemetry + LGTM)
1.1 KiB
1.1 KiB
title, impact, impactDescription, tags, description, alwaysApply
| title | impact | impactDescription | tags | description | alwaysApply |
|---|---|---|---|---|---|
| Manage Indexes for Zero-Downtime Updates | MEDIUM | Use aliases for seamless index updates | rqe, index, alias, management, reindex | Manage Indexes for Zero-Downtime Updates | true |
Manage Indexes for Zero-Downtime Updates
Use aliases to swap indexes without application changes.
Correct: Use aliases for production indexes.
# Create versioned index
FT.CREATE idx:products_v2 ON HASH PREFIX 1 product:
SCHEMA
name TEXT
category TAG SORTABLE
price NUMERIC SORTABLE
# Point alias to new index
FT.ALIASADD products idx:products_v2
# Application queries use alias
FT.SEARCH products "@category:{electronics}"
# Later, swap to new version
FT.ALIASUPDATE products idx:products_v3
Useful management commands:
# Check index info
FT.INFO idx:products
# Drop and recreate (non-blocking)
FT.DROPINDEX idx:products
FT.CREATE idx:products ...
# List all indexes
FT._LIST
Reference: Redis Search Index Management