Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
redis-py-version: ["5.x", "6.x", "7.x"]
redis-image: ["redis/redis-stack-server:latest", "redis:latest"]
redis-image: ["redis:8.2", "redis:8.4", "redis:latest"]
steps:
- name: Check out repository
uses: actions/checkout@v6
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
uses: google-github-actions/auth@v1
if: (
matrix.redis-py-version == '7.x' &&
matrix.redis-image == 'redis/redis-stack-server:latest' &&
matrix.redis-image == 'redis:8.4' &&
matrix.python-version == '3.11' &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
)
Expand All @@ -128,7 +128,7 @@ jobs:
- name: Run notebooks
if: (
matrix.redis-py-version == '7.x' &&
matrix.redis-image == 'redis/redis-stack-server:latest' &&
matrix.redis-image == 'redis:8.4' &&
matrix.python-version == '3.11' &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
)
Expand All @@ -147,7 +147,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
docker run -d --name redis -p 6379:6379 redis/redis-stack-server:latest
docker run -d --name redis -p 6379:6379 redis:8.4
make test-notebooks

docs:
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ make test-all # Run all tests (includes API tests)
make check # Full check (lint + test)

# Redis setup
make redis-start # Start Redis Stack container
make redis-stop # Stop Redis Stack container
make redis-start # Start Redis container
make redis-stop # Stop Redis container

# Documentation
make docs-build # Build documentation
Expand Down
20 changes: 9 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Here's how to get started with your code contribution:
### Prerequisites

- **Python**: RedisVL supports Python 3.9 and above
- **Docker**: Required for running Redis Stack and integration tests
- **Docker**: Required for running Redis and integration tests
- **UV**: Modern Python package manager for fast dependency management

### Installing UV
Expand Down Expand Up @@ -88,8 +88,8 @@ We provide a comprehensive Makefile to streamline common development tasks. Here
| Command | Description |
|---------|-------------|
| `make install` | Installs all dependencies using UV |
| `make redis-start` | Starts Redis Stack in a Docker container on ports 6379 and 8001 |
| `make redis-stop` | Stops the Redis Stack Docker container |
| `make redis-start` | Starts Redis in a Docker container on port 6379 |
| `make redis-stop` | Stops the Redis Docker container |
| `make format` | Runs code formatting and import sorting |
| `make check-types` | Runs mypy type checking |
| `make lint` | Runs formatting, import sorting, and type checking |
Expand All @@ -106,7 +106,7 @@ We provide a comprehensive Makefile to streamline common development tasks. Here
# Set up the project
make install

# Start Redis Stack
# Start Redis
make redis-start

# Run linting and tests
Expand Down Expand Up @@ -194,26 +194,24 @@ uv run python -m http.server 8000 --directory docs/_build/html

## Redis Setup

To develop and test RedisVL applications, you need Redis with Search & Query features. You have several options:
To develop and test RedisVL applications, you need Redis with Redis Search enabled. You have several options:

### Option 1: Redis Stack with Docker (Recommended for Development)
### Option 1: Redis with Docker (Recommended for Development)

```bash
# Start Redis Stack with RedisInsight GUI
# Start Redis
make redis-start

# This runs:
# docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
# docker run -d --name redis -p 6379:6379 redis:8.4

# Stop when finished
make redis-stop
```

This also provides the [FREE RedisInsight GUI](https://redis.io/insight/) at `http://localhost:8001`.

### Option 2: Redis Cloud

For production-like testing, use [Redis Cloud](https://redis.io/cloud/) which provides managed Redis instances with Search & Query capabilities.
For production-like testing, use [Redis Cloud](https://redis.io/cloud/) which provides managed Redis instances with Redis Search capabilities.

## Reporting Issues

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ install: ## Install the project and all dependencies

redis-start: ## Start Redis in Docker
@echo "🐳 Starting Redis"
docker run -d --name redis -p 6379:6379 redis:latest
docker run -d --name redis -p 6379:6379 redis:8.4
@sleep 1
@docker exec redis redis-cli INFO server | grep redis_version

Expand Down
6 changes: 3 additions & 3 deletions docs/api/schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ SVS-VAMANA (Scalable Vector Search with VAMANA graph algorithm) provides fast ap
:color: info

**Requirements:**
- Redis >= 8.2.0 with RediSearch >= 2.8.10
- Redis >= 8.2.0 with Redis Search >= 2.8.10
- datatype must be 'float16' or 'float32' (float64/bfloat16 not supported)

**Use SVS-VAMANA when:**
Expand Down Expand Up @@ -353,7 +353,7 @@ SVS-VAMANA (Scalable Vector Search with VAMANA graph algorithm) provides fast ap

**Important Notes:**

- **Requirements**: SVS-VAMANA requires Redis >= 8.2 with RediSearch >= 2.8.10.
- **Requirements**: SVS-VAMANA requires Redis >= 8.2 with Redis Search >= 2.8.10.
- **Datatype limitations**: SVS-VAMANA only supports `float16` and `float32` datatypes (not `bfloat16` or `float64`).
- **Compression compatibility**: The `reduce` parameter is only valid with LeanVec compression types (`LeanVec4x8` or `LeanVec8x8`).
- **Platform considerations**: Intel's proprietary LVQ and LeanVec optimizations are not available in Redis Open Source. On non-Intel platforms and Redis Open Source, SVS-VAMANA with compression falls back to basic 8-bit scalar quantization.
Expand Down Expand Up @@ -511,7 +511,7 @@ Migration Considerations
- Tune ``ef_runtime`` at query time to balance speed vs accuracy (no index rebuild needed)

**From HNSW to SVS-VAMANA:**
- Requires Redis >= 8.2 with RediSearch >= 2.8.10
- Requires Redis >= 8.2 with Redis Search >= 2.8.10
- Change datatype to float16 or float32 if using others
- Consider compression options for memory savings

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/field-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ Key vector attributes:

### Modifier Ordering

RediSearch has specific requirements for the order of field modifiers. RedisVL handles this automatically, but it's useful to understand:
Redis Search has specific requirements for the order of field modifiers. RedisVL handles this automatically, but it's useful to understand:

**Canonical order**: `INDEXEMPTY` → `INDEXMISSING` → `SORTABLE` → `UNF` → `NOINDEX`

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pip install redisvl
```

```bash
docker run -d --name redis -p 6379:6379 redis:latest
docker run -d --name redis -p 6379:6379 redis:8.4
```

Or connect to [Redis Cloud](https://redis.io/cloud) for a managed experience.
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/09_svs_vamana.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"\n",
"Before you begin, ensure you have:\n",
"- Installed RedisVL: `pip install redisvl`\n",
"- A running Redis instance with Redis >= 8.2.0 and RediSearch >= 2.8.10 ([Redis 8+](https://redis.io/downloads/) or [Redis Cloud](https://redis.io/cloud))\n",
"- A running Redis instance with Redis >= 8.2.0 and Redis Search >= 2.8.10 ([Redis 8+](https://redis.io/downloads/) or [Redis Cloud](https://redis.io/cloud))\n",
"\n",
"> **Note:** SVS-VAMANA only supports FLOAT16 and FLOAT32 datatypes.\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/cli.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"\n",
"Before running this notebook, be sure to\n",
"1. Have installed ``redisvl`` and have that environment active for this notebook.\n",
"2. Have a running Redis instance with the Search and Query capability"
"2. Have a running Redis instance with Redis Search enabled"
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions docs/user_guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,26 +120,26 @@ $ pre-commit run --all-files

## Installing Redis

RedisVL requires a distribution of Redis that supports the [Search and Query](https://redis.com/modules/redis-search/) capability. There are several options:
RedisVL requires Redis with [Redis Search](https://redis.io/docs/latest/develop/ai/search-and-query/) available. There are several options:

1. [Redis Cloud](https://redis.io/cloud), a fully managed cloud offering with a free tier
2. [Redis 8+ (Docker)](https://redis.io/downloads/), for local development and testing
3. [Redis Enterprise](https://redis.com/redis-enterprise/), a commercial self-hosted option

### Redis Cloud

Redis Cloud is the easiest way to get started with RedisVL. You can sign up for a free account [here](https://redis.io/cloud). Make sure to have the `Search and Query`
capability enabled when creating your database.
Redis Cloud is the easiest way to get started with RedisVL. You can sign up for a free account [here](https://redis.io/cloud). Make sure to have `Redis Search`
enabled when creating your database.

### Redis 8+ (local development)

For local development and testing, we recommend running Redis 8+ in a Docker container:

```bash
docker run -d --name redis -p 6379:6379 redis:latest
docker run -d --name redis -p 6379:6379 redis:8.4
```

Redis 8 includes built-in vector search capabilities.
Redis 8 includes Redis Search and built-in vector search capabilities.

### Redis Enterprise (self-hosted)

Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,7 @@ filterwarnings = [
warn_unused_configs = true
ignore_missing_imports = true
exclude = ["env", "venv", ".venv"]

[[tool.mypy.overrides]]
module = ["mistralai", "mistralai.*"]
follow_imports = "skip"
4 changes: 2 additions & 2 deletions redisvl/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def for_svs_vamana(cls, min_redis_version: str):
RedisModuleVersionError with formatted message
"""
message = (
f"SVS-VAMANA requires Redis >= {min_redis_version} with RediSearch >= 2.8.10. "
f"Options: 1) Upgrade Redis Stack, "
f"SVS-VAMANA requires Redis >= {min_redis_version} with Redis Search >= 2.8.10. "
f"Options: 1) Upgrade Redis to a version with Redis Search >= 2.8.10, "
f"2) Use algorithm='hnsw' or 'flat', "
f"3) Remove compression parameters"
)
Expand Down
6 changes: 3 additions & 3 deletions redisvl/query/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def __init__(

return_score (bool, optional): Whether to return the vector
distance. Defaults to True.
dialect (int, optional): The RediSearch query dialect.
dialect (int, optional): The Redis Search query dialect.
Defaults to 2.
sort_by (Optional[SortSpec]): The field(s) to order the results by. Can be:
- str: single field name
Expand Down Expand Up @@ -949,7 +949,7 @@ def __init__(
Defaults to 10.
return_score (bool, optional): Whether to return the vector
distance. Defaults to True.
dialect (int, optional): The RediSearch query dialect.
dialect (int, optional): The Redis Search query dialect.
Defaults to 2.
sort_by (Optional[SortSpec]): The field(s) to order the results by. Can be:
- str: single field name
Expand Down Expand Up @@ -1381,7 +1381,7 @@ def __init__(
search. Defaults to 10.
return_score (bool, optional): Whether to return the text score.
Defaults to True.
dialect (int, optional): The RediSearch query dialect.
dialect (int, optional): The Redis Search query dialect.
Defaults to 2.
sort_by (Optional[SortSpec]): The field(s) to order the results by. Can be:
- str: single field name
Expand Down
4 changes: 2 additions & 2 deletions redisvl/redis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def supports_svs(client: SyncRedisClient) -> bool:
redis_ok = is_version_gte(redis_version, SVS_MIN_REDIS_VERSION)

# Check either search or searchlight module (only one is typically installed)
# RediSearch is the open-source module, SearchLight is the enterprise version
# Redis Search is the open-source module, SearchLight is the enterprise version
modules_ok = (
search_ver >= SVS_MIN_SEARCH_VERSION
or searchlight_ver >= SVS_MIN_SEARCH_VERSION
Expand Down Expand Up @@ -158,7 +158,7 @@ async def supports_svs_async(client: AsyncRedisClient) -> bool:
redis_ok = is_version_gte(redis_version, SVS_MIN_REDIS_VERSION)

# Check either search or searchlight module (only one is typically installed)
# RediSearch is the open-source module, SearchLight is the enterprise version
# Redis Search is the open-source module, SearchLight is the enterprise version
modules_ok = (
search_ver >= SVS_MIN_SEARCH_VERSION
or searchlight_ver >= SVS_MIN_SEARCH_VERSION
Expand Down
4 changes: 2 additions & 2 deletions redisvl/redis/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
{"name": "searchlight", "ver": 20600},
]

# SVS-VAMANA requires Redis 8.2+ with RediSearch 2.8.10+
# SVS-VAMANA requires Redis 8.2+ with Redis Search 2.8.10+
SVS_REQUIRED_MODULES = [
{"name": "search", "ver": 20810}, # RediSearch 2.8.10+
{"name": "search", "ver": 20810}, # Redis Search 2.8.10+
{"name": "searchlight", "ver": 20810},
]

Expand Down
12 changes: 6 additions & 6 deletions redisvl/schema/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ class CompressionType(str, Enum):
def _normalize_field_modifiers(
field: RedisField, canonical_order: List[str], want_unf: bool = False
) -> None:
"""Normalize field modifier ordering for RediSearch parser.
"""Normalize field modifier ordering for Redis Search parser.

RediSearch has a parser limitation where INDEXEMPTY and
Redis Search has a parser limitation where INDEXEMPTY and
INDEXMISSING must appear BEFORE SORTABLE in field definitions. This function
reorders field.args_suffix to match the canonical order.

Expand Down Expand Up @@ -414,7 +414,7 @@ def as_redis_field(self) -> RedisField:

field = RedisTextField(name, **kwargs)

# Normalize suffix ordering to satisfy RediSearch parser expectations.
# Normalize suffix ordering to satisfy Redis Search parser expectations.
# Canonical order: [INDEXEMPTY] [INDEXMISSING] [SORTABLE [UNF]] [NOINDEX]
canonical_order = ["INDEXEMPTY", "INDEXMISSING", "SORTABLE", "UNF", "NOINDEX"]
want_unf = self.attrs.unf and self.attrs.sortable # type: ignore
Expand Down Expand Up @@ -456,7 +456,7 @@ def as_redis_field(self) -> RedisField:

field = RedisTagField(name, **kwargs)

# Normalize suffix ordering to satisfy RediSearch parser expectations.
# Normalize suffix ordering to satisfy Redis Search parser expectations.
# Canonical order: [INDEXEMPTY] [INDEXMISSING] [SORTABLE] [NOINDEX]
canonical_order = ["INDEXEMPTY", "INDEXMISSING", "SORTABLE", "NOINDEX"]
_normalize_field_modifiers(field, canonical_order)
Expand Down Expand Up @@ -491,7 +491,7 @@ def as_redis_field(self) -> RedisField:

field = RedisNumericField(name, **kwargs)

# Normalize suffix ordering to satisfy RediSearch parser expectations.
# Normalize suffix ordering to satisfy Redis Search parser expectations.
# Canonical order: [INDEXMISSING] [SORTABLE [UNF]] [NOINDEX]
# Note: INDEXEMPTY is not supported for NUMERIC fields
canonical_order = ["INDEXMISSING", "SORTABLE", "UNF", "NOINDEX"]
Expand Down Expand Up @@ -528,7 +528,7 @@ def as_redis_field(self) -> RedisField:

field = RedisGeoField(name, **kwargs)

# Normalize suffix ordering to satisfy RediSearch parser expectations.
# Normalize suffix ordering to satisfy Redis Search parser expectations.
# Canonical order: [INDEXMISSING] [SORTABLE] [NOINDEX]
# Note: INDEXEMPTY is not supported for GEO fields
canonical_order = ["INDEXMISSING", "SORTABLE", "NOINDEX"]
Expand Down
4 changes: 2 additions & 2 deletions redisvl/utils/token_escaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class TokenEscaper:
Adapted from RedisOM Python.
"""

# Characters that RediSearch requires us to escape during queries.
# Source: https://redis.io/docs/latest/develop/ai/search-and-query/advanced-concepts/escaping/#tokenization-rules-for-text-fields
# Characters that Redis Search requires us to escape during queries.
# Source: https://redis.io/docs/stack/search/reference/escaping/#the-rules-of-text-field-tokenization
DEFAULT_ESCAPED_CHARS = r"[,.<>{}\[\]\\\"\':;!@#$%^&*()\-+=~\/ \?]"

# Same as above but excludes * and ? to allow wildcard patterns
Expand Down
Loading
Loading