Skip to main content

Hermes

A high-performance, embeddable full-text search engine written in Rust.

Features

  • Fast indexing - Parallel segment building and compression
  • BM25 ranking - Industry-standard relevance scoring
  • WAND optimization - Efficient top-k query processing
  • Multiple platforms - Native, WASM, and Python bindings
  • Flexible schema - SDL-based schema definition language
  • Compression - Zstd compression with configurable levels
  • Slice caching - Optimized for cold-start latency

Packages

Package Description Registry
hermes-core Core search engine library crates.io
hermes-tool CLI for index management and data processing crates.io
hermes-server gRPC server for remote search crates.io
hermes-core-python Python bindings PyPI
hermes-wasm WASM bindings for browsers npm

Quick Start

Installation

# Install CLI tool
cargo install hermes-tool

# Or use as a library
cargo add hermes-core

Create an Index

# Create index from SDL schema
hermes-tool create -i ./my_index -s schema.sdl

# Index documents from JSONL
cat documents.jsonl | hermes-tool index -i ./my_index --stdin

# Or from compressed file
zstdcat dump.zst | hermes-tool index -i ./my_index --stdin -p 50000

# Merge segments
hermes-tool merge -i ./my_index

# Show index info
hermes-tool info -i ./my_index

Schema Definition (SDL)

index documents {
    field title: text [indexed, stored]
    field content: text [indexed]
    field author: text [indexed, stored]
    field published_at: u64 [indexed, stored]
}

Data Processing Tools

# Calculate SimHash for near-duplicate detection
cat docs.jsonl | hermes-tool simhash -f title -o title_hash

# Sort documents by field
cat docs.jsonl | hermes-tool sort -f score -N -r

# Pipeline example
zstdcat dump.zst \
    | hermes-tool simhash -f title -o hash \
    | hermes-tool sort -f hash -N \
    | hermes-tool index -i ./my_index --stdin

Using as a Library

use hermes_core::{Index, IndexConfig, FsDirectory};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let dir = FsDirectory::new("./my_index");
    let config = IndexConfig::default();
    let index = Index::open(dir, config).await?;

    println!("Documents: {}", index.num_docs());

    Ok(())
}

Python Usage

import hermes_core

# Open index
index = hermes_core.Index("./my_index")

# Search
results = index.search("query text", limit=10)
for doc in results:
    print(doc.score, doc.fields)

WASM Usage

import init, { HermesIndex } from "hermes-wasm";

await init();
const index = await HermesIndex.open("/ipfs/Qm.../");
const results = await index.search("query text", 10);

Development

Prerequisites

  • Rust 1.92+
  • Python 3.12+ (for Python bindings)
  • Node.js 20+ (for WASM)
  • wasm-pack (for WASM builds)

Building

# Build all packages
cargo build --release

# Build WASM
cd hermes-wasm && wasm-pack build --release --target web

# Build Python wheel
cd hermes-core-python && maturin build --release

Testing

cargo test --all-features

Linting

# Install pre-commit hooks
pip install pre-commit
pre-commit install

# Run linters
cargo fmt --all
cargo clippy --all-targets --all-features

License

MIT

Metadata

Release files for hermes-core-python 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for hermes-core-python 1.0.2
File
hermes_core_python-1.0.2-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
hermes_core_python-1.0.2-cp314-cp314-manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.34+ x86-64 Details
hermes_core_python-1.0.2-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
hermes_core_python-1.0.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
hermes_core_python-1.0.2-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details
hermes_core_python-1.0.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
hermes_core_python-1.0.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
hermes_core_python-1.0.2-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details
hermes_core_python-1.0.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details

Total release size: 8.7 MB

Release files / hermes_core_python-1.0.2-cp314-cp314-win_amd64.whl

Download URL hermes_core_python-1.0.2-cp314-cp314-win_amd64.whl
Size 866.3 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
d25a9c4c04dcedd4627faa91afada746a395124b89d562d3a57ab99b94a25cf0
BLAKE2b-256 checksum
How to use checksums
45da5f3ea135a8733f7fdac168f9522c4a34cfa18ca7d530507d527a4f121753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / hermes_core_python-1.0.2-cp314-cp314-manylinux_2_34_x86_64.whl

Download URL hermes_core_python-1.0.2-cp314-cp314-manylinux_2_34_x86_64.whl
Size 1.1 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
a0c161bdb6e5ff9bf7fa19265195e455dff811c63dd3b83d7ca34655da982696
BLAKE2b-256 checksum
How to use checksums
2af6fab616db2a9fcf240011b0962b9027197299117d0d48aee82f1e98de3499
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / hermes_core_python-1.0.2-cp314-cp314-macosx_11_0_arm64.whl

Download URL hermes_core_python-1.0.2-cp314-cp314-macosx_11_0_arm64.whl
Size 907.4 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8fa11669e6b8970f8ef4c092c650680e9896d3eefc1c5251704e8d0bd4d71379
BLAKE2b-256 checksum
How to use checksums
e710421cc59c147a6a1b9a9948ab11a2bc50453b97010a3768fa90af2dfc7b51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / hermes_core_python-1.0.2-cp313-cp313-win_amd64.whl

Download URL hermes_core_python-1.0.2-cp313-cp313-win_amd64.whl
Size 866.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
2f42ace47501997f1566f49ced1d8b78224f364510fddf108ac76feed1869e1c
BLAKE2b-256 checksum
How to use checksums
50d9a4feb3d7a0dbf3ab61cc32708f6eee07e1449140e8dfa24990f42f125bb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / hermes_core_python-1.0.2-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL hermes_core_python-1.0.2-cp313-cp313-manylinux_2_34_x86_64.whl
Size 1.1 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
375c6a8bf44715428ff7763f30702fd1309057946d8fd413653b19e63c6f2b7e
BLAKE2b-256 checksum
How to use checksums
d01f86bacbb01b4586e6d3cd4cd06f332539dc9717cb4fb0593f96e246343ca0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / hermes_core_python-1.0.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL hermes_core_python-1.0.2-cp313-cp313-macosx_11_0_arm64.whl
Size 909.8 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a7d4c24179e1bcced14d0d837cd921089b851336e8f9d7b9b358cf6a7992b2f8
BLAKE2b-256 checksum
How to use checksums
c19729194d2f4d10835f6b5be7956b8de2bcd065a4d5c7362a27b6b80bfc78bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / hermes_core_python-1.0.2-cp312-cp312-win_amd64.whl

Download URL hermes_core_python-1.0.2-cp312-cp312-win_amd64.whl
Size 866.2 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
8c59feaf0964c89212c622eebac423e725a8de5fbde31499f9e2e5c721b0e6b9
BLAKE2b-256 checksum
How to use checksums
37f58407c946d46eaaac8ebc12c4fb2f092e8a3e75c920572b7a8d3af76d970d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / hermes_core_python-1.0.2-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL hermes_core_python-1.0.2-cp312-cp312-manylinux_2_34_x86_64.whl
Size 1.1 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
979f60a88433bb440405f1315e6485045e6ac197f860cade0df9da0723aee764
BLAKE2b-256 checksum
How to use checksums
b3972e331c4b2da18169e3eb3f71c8c88fe9e2ab36590b857b18e2bcfff2f610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / hermes_core_python-1.0.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL hermes_core_python-1.0.2-cp312-cp312-macosx_11_0_arm64.whl
Size 909.7 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e1341a1abeaf66ca00e3c35cf26975243a6b807c473ba868807f3d352a35c6a5
BLAKE2b-256 checksum
How to use checksums
deada45487fa84fb689fb30127926d960a81ab9aad8d44826203e0e2598bd9ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for hermes-core-python 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page