No project description provided
Project description
Rottnest : Data Lake Indices
You don't need ElasticSearch or some vector database to do full text search or vector search. Parquet + Rottnest is all you need. Rottnest is like Postgres indices for Parquet.
Installation
Local installation: pip install rottnest
Kubernetes Operator (upcoming)
How to use
Build indices on your Parquet files, merge them, and query them. Very simple. Let's walk through a very simple example, in demo.py
. It builds a BM25 index on two Parquet files, merges the indices, and searches the merged index for records related to cell phones. The code is here:
import rottnest
rottnest.index_file_bm25("example_data/0.parquet", "body", "index0")
rottnest.index_file_bm25("example_data/1.parquet", "body", "index1")
rottnest.merge_index_bm25("merged_index", ["index0", "index1"])
result = rottnest.search_index_bm25(["merged_index"], "cell phones", K = 10)
This code will still work if the Parquet files are in fact on object storage. You can copy the data files to an S3 bucket, say s3://example_data/
. Then the following code will work:
import rottnest
rottnest.index_file_bm25("s3://example_data/0.parquet", "body", "index0")
rottnest.index_file_bm25("s3://example_data/1.parquet", "body", "index1")
rottnest.merge_index_bm25("merged_index", ["index0", "index1"])
result = rottnest.search_index_bm25(["merged_index"], "cell phones", K = 10)
It will use the index to search against the Parquet files on S3 directly. Rottnest has its own Parquet reader that makes this very very efficient.
Rottnest not only supports BM25 indices but also other indices, like regex and vector searches. More documentation will be forthcoming.
Regex
Vector
Architecture
Development
Build Python wheel
maturin develop --features py
Project details
Release history Release notifications | RSS feed
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
Hashes for rottnest-1.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f812a4bd1d7af12a41163dd287da259b78c8310f4d4f291b9c278508cf3eafb |
|
MD5 | 233c8057f15c0d21a3828b7a7246229d |
|
BLAKE2b-256 | 4482ecc7e8d9d3ab2e3bd2316ac54c1d3401f533184bf9761a0ac470197cb926 |
Hashes for rottnest-1.2.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36e5857a87b669728a37c3e151391ad6d2c11b094655e25163b7a19802230709 |
|
MD5 | afbc23870914d5a9a8f46128520fcecb |
|
BLAKE2b-256 | 324ec1fd0c39d2dc6e835a7fd93609ad6688037fc42cd5c7c612cd5096a1fb51 |
Hashes for rottnest-1.2.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a921e23cbe190cc82ae7893e3fe0b231f0fc45432efa3e6507ba0a7576825a5 |
|
MD5 | d0a010b36e263a01718f1dda4bb27cdd |
|
BLAKE2b-256 | d1c67ea17e767e18113ced193a0df285a9e8bab787c89f6f025cfbbb3ca21dae |