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. Read more on what it can do for e.g. logs here.
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.
Phrase Matches
Vector Approximate Nearest Neighbor
Architecture
Development
Build Python wheel
maturin develop --features "py,opendal"
or
maturin develop --features "py,aws_sdk"
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.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b21ada57a8e531431824bdbf179618bc7999ad4df8090118b1747be0a0d3de23 |
|
MD5 | 158547fe4742507a268ebbba64a43d77 |
|
BLAKE2b-256 | 4dcd21f43fcfcf760b0872a2f13ef506c57ab17d2b17252455c72aa294bc12ec |
Hashes for rottnest-1.3.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f985d803d30a277900223ffabefedd7b5e8848e2a2a2a8cd25ca80ba93ce56d |
|
MD5 | f8eeb8628300596fc8df74a974759429 |
|
BLAKE2b-256 | e3f14bd1f85cfc1d865aa825c0901d680549f3b1d4f7cc073e58946671b00c04 |