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.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9e0e2fd2880ff20a2f33c4d691111100a5c8f85e5708734ea0b57c2c6a8149e |
|
MD5 | 34fb93295f98f08057037e7b846aaaab |
|
BLAKE2b-256 | 58c555f1ea933183d5c8f39bd3325c429539004c0bdbbb765af85a3a065aae08 |
Hashes for rottnest-1.3.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b527f05b73940c8722df0547181ca6e369915dad9225569c3479cb5f125aa45 |
|
MD5 | 901e4d66c97fd48308f373b70c3ce137 |
|
BLAKE2b-256 | a75c11040616246b8443032546a98f09560fa954a94b70ec2907c0cbfb8a1d8c |