This release is a pre-release and may not be stable for production use.
Lightweight vector index extension for the open lakehouse stack.
Quick Start | Why Relify | Compute Engines | Benchmarks | Documentation
Relify is an open-source Python and Rust library for indexing and searching lakehouse data with the compute engines you already use. It stores vector indexes as open Parquet or Iceberg tables, allowing DataFusion, StarRocks, and Spark to query them directly with SQL while source data stays where it is.
Relify targets analytical and offline vector workloads such as large-k retrieval, similarity joins, and vector search composed with analytical queries. Dedicated vector databases remain the better fit for latency-sensitive, high-concurrency online serving.
Quick Start
Relify supports standard CPython 3.11 through 3.14 on Linux x86_64 and macOS arm64. Install the embedded DataFusion and Parquet path:
python -m pip install relify
Spark and StarRocks are optional integrations with separate setup; see Compute Engines.
From a new working directory, build an IVF-Flat index over the dataset included in the package and run a filtered vector query:
import relify
session = relify.connect("./relify-data")
session.register_parquet("documents", relify.datasets.uri("documents"))
documents = session.table("documents")
documents.create_index(
"documents_embedding",
column="embedding",
key=["document_id"],
config=relify.IVF(nlist=3),
)
documents.wait_for_index("documents_embedding")
query = (
documents.search([0.2, 0.0], column="embedding")
.where("tenant_id = 42 AND status = 'published'")
.nprobes(3)
.limit(3)
.select(["document_id", "title", "category"])
)
print(session.collect(query).to_pylist())
Vector search remains a relation rather than a terminal service call. Keep the query lazy, register it as a DataFusion view, and continue with SQL in the same execution context:
session.register_parquet(
"document_stats",
relify.datasets.uri("document_stats"),
)
session.register_view("vector_hits", session.to_dataframe(query))
summary = session.sql("""
SELECT
h.category,
COUNT(*) AS matches,
AVG(h._distance) AS avg_distance,
MAX(s.popularity) AS max_popularity
FROM vector_hits AS h
JOIN document_stats AS s USING (document_id)
GROUP BY h.category
ORDER BY h.category
""")
print(summary.to_pydict())
The packaged dataset makes this example self-contained. The getting-started guide covers persistent tables, existing indexes, query inspection, and source schema requirements.
Why Relify
- Zero ETL into a vector database. Source vectors stay in their existing lakehouse tables; Relify writes only index data and metadata.
- One open vector index. IVF centroids and postings are ordinary relational data, published as Parquet datasets or Iceberg tables rather than an engine-owned binary artifact.
- Across compute engines. Engine-specific backends consume the same index model and query contract instead of maintaining a separate copy per runtime.
- SQL-native execution. Cluster pruning, source filtering, joins, distance computation, and top-k remain inside the host engine's relational plan.
Compute Engines
| Engine | Model | Current capability | Status |
|---|---|---|---|
| DataFusion | Embedded | Build and query Parquet indexes in one Python process | Supported |
| Spark Classic | Batch | Build Iceberg indexes; query Parquet and Iceberg | Experimental |
| StarRocks | OLAP | Query Spark-built Iceberg indexes over Arrow Flight SQL | Experimental |
DataFusion is the default backend. Spark and StarRocks live under
relify.experimental and require caller-managed engines and catalog
configuration. All three use the same query model and open index metadata.
See the local, Spark, and StarRocks guides for installation and configuration.
How It Works
Source rows remain in their original Parquet or Iceberg table. Building an IVF-Flat index writes only portable metadata, centroids, and postings as open table data.
At query time, an engine-specific adapter binds the source and index to DataFusion, StarRocks, or Spark. The engine performs candidate pruning, source filtering, distance calculation, top-k, and subsequent analytical SQL in its own runtime.
The open index specification defines the shared schema and query semantics; the architecture guide describes the implementation boundaries.
Benchmarks
The current reproducible benchmark compares persisted, single-node IVF-Flat construction and memory-resident large-k search on one million 128-dimensional vectors. It ran on a 10-core Apple M4 with 16 GB of unified memory.
Both implementations start from the same uncompressed Parquet source. Query
measurements use one query at a time, nlist=4,096, increasing nprobe, and
k=10,000, 20,000, and 100,000. See the
methodology and raw results
for complete measurements.
Documentation
- Getting started and Python examples
- Core concepts, architecture, and open index specification
- Python API and configuration
- Current limitations, troubleshooting, and roadmap
TEngineDB-V
Relify began as the open-source research prototype behind TEngineDB-V. The project now develops those ideas into a general-purpose vector extension for the open lakehouse stack.
Development
Relify uses uv, Maturin, Cargo, and a small Makefile orchestration layer:
make sync
make develop
make check
See CONTRIBUTING.md for quality gates, fixtures, benchmarks, and contribution guidelines.
License
Relify's original code is available under the MIT License. Wheels include the vendored DataFusion Python binding under Apache-2.0; see the third-party notices.
Relify builds on work from LanceDB, DataFusion, DuckDB, StarRocks, Apache Spark, and Apache Iceberg, with gratitude to their contributors and communities.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file relify-0.1.0rc2-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: relify-0.1.0rc2-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 68.7 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e86e6b0518b6220fcd7a6e1ff818590de5bb2553b3bbbf959567c58ff9539343
|
|
| MD5 |
cbda5f2548ea8138dbb4defc8ac9be2a
|
|
| BLAKE2b-256 |
65d6fb1caeaad68db2ce5e3376864e623a2dceca8a51ca206d44281e3eb5cb25
|
Provenance
The following attestation bundles were made for relify-0.1.0rc2-cp310-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on petrizhang/relify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relify-0.1.0rc2-cp310-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
e86e6b0518b6220fcd7a6e1ff818590de5bb2553b3bbbf959567c58ff9539343 - Sigstore transparency entry: 2339097846
- Sigstore integration time:
-
Permalink:
petrizhang/relify@0c5397b68c715a95a876094d4f54442e68353905 -
Branch / Tag:
refs/tags/v0.1.0rc2 - Owner: https://github.com/petrizhang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0c5397b68c715a95a876094d4f54442e68353905 -
Trigger Event:
push
-
Statement type:
File details
Details for the file relify-0.1.0rc2-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: relify-0.1.0rc2-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 62.6 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0935f536de06744076893b7a6da55690a7906cb2c757974895c4185af028d464
|
|
| MD5 |
8eb8501a685133692351bd17ec15847c
|
|
| BLAKE2b-256 |
90f00a50142251404c53cac6b0d94ef88c27c69be388371526b8db4b63616918
|
Provenance
The following attestation bundles were made for relify-0.1.0rc2-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on petrizhang/relify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relify-0.1.0rc2-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
0935f536de06744076893b7a6da55690a7906cb2c757974895c4185af028d464 - Sigstore transparency entry: 2339097842
- Sigstore integration time:
-
Permalink:
petrizhang/relify@0c5397b68c715a95a876094d4f54442e68353905 -
Branch / Tag:
refs/tags/v0.1.0rc2 - Owner: https://github.com/petrizhang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0c5397b68c715a95a876094d4f54442e68353905 -
Trigger Event:
push
-
Statement type: