Lexical Augmented Unified Retrieval Using Semantics
See the codeLaurus is a search platform written in Rust — built for Lexical Augmented Unified Retrieval Using Semantics. Built on a core library covering lexical search, vector search, and hybrid search, it provides multiple ready-to-use interfaces:
Whether embedded as a library, deployed as a standalone server, called from Python / Node.js / Ruby / PHP, run in the browser via WASM, or woven into AI workflows, Laurus is a composable search foundation.
Try Laurus directly in your browser — every sample runs entirely client-side via WebAssembly:
https://mosuka.github.io/laurus/demo/
| Sample | What it shows |
|---|---|
| basic | Japanese full-text, vector, and hybrid search with the unified query DSL |
| geo | Tokyo points-of-interest on a Leaflet map with bounding-box + text + vector queries |
| geo3d | Live aircraft on a CesiumJS 3D globe using geo3d_bbox / geo3d_nearest (true ECEF 3D, including altitude) |
Comprehensive documentation is available online:
Strict / Dynamic / Ignore policies for fine-grained control.Laurus is organized as a Cargo workspace with 9 crates:
| Crate | Description |
|---|---|
laurus | Core search library — schema, analysis, indexing, search, and storage |
laurus-cli | Command-line interface with REPL for interactive search |
laurus-server | gRPC server with HTTP gateway for deploying Laurus as a service |
laurus-mcp | MCP server for AI assistants (Claude, etc.) via stdio transport |
laurus-python | Python bindings (PyPI package) built with PyO3 and Maturin |
laurus-nodejs | Node.js bindings (npm package) built with NAPI-RS |
laurus-wasm | WebAssembly bindings (npm package) built with wasm-bindgen |
laurus-ruby | Ruby bindings (RubyGems package) built with magnus and rb-sys |
laurus-php | PHP bindings (PHP extension) built with ext-php-rs |
The laurus crate provides optional feature flags for embedding support:
| Feature | Description |
|---|---|
embeddings-candle | Local BERT embeddings via Candle |
embeddings-openai | Cloud-based embeddings via the OpenAI API |
embeddings-multimodal | CLIP-based multimodal (text + image) embeddings |
embeddings-all | Enable all embedding backends |
use laurus::lexical::{TermQuery, TextOption};
use laurus::storage::memory::MemoryStorageConfig;
use laurus::storage::{StorageConfig, StorageFactory};
use laurus::{Document, Engine, LexicalSearchRequest, Schema, SearchRequestBuilder};
#[tokio::main]
async fn main() -> laurus::Result<()> {
// 1. Create storage
let storage = StorageFactory::create(StorageConfig::Memory(MemoryStorageConfig::default()))?;
// 2. Define schema
let schema = Schema::builder()
.add_text_field("title", TextOption::default())
.add_text_field("body", TextOption::default())
.build();
// 3. Create engine
let engine = Engine::new(storage, schema).await?;
// 4. Index documents
engine
.add_document(
"doc1",
Document::builder()
.add_text("title", "Introduction to Rust")
.add_text(
"body",
"Rust is a systems programming language focused on safety and performance.",
)
.build(),
)
.await?;
engine
.add_document(
"doc2",
Document::builder()
.add_text("title", "Python for Data Science")
.add_text(
"body",
"Python is a versatile language widely used in data science and machine learning.",
)
.build(),
)
.await?;
engine.commit().await?;
// 5. Search
let results = engine
.search(
SearchRequestBuilder::new()
.lexical_search_request(LexicalSearchRequest::new(Box::new(TermQuery::new(
"body", "rust",
))))
.limit(5)
.build(),
)
.await?;
for hit in &results {
println!("score={:.4}", hit.score);
}
Ok(())
}
You can find usage examples in the laurus/examples/ directory:
| Example | Description | Feature Flag |
|---|---|---|
| quickstart | Basic full-text search | — |
| lexical_search | All query types (Term, Phrase, Boolean, Fuzzy, Wildcard, Range, Geo, Span) | — |
| vector_search | Semantic similarity search with embeddings | — |
| hybrid_search | Combining lexical and vector search with fusion | — |
| geo3d_search | 3D ECEF geographic search (sphere, bounding box, k-NN) | — |
| synonym_graph_filter | Synonym expansion in analysis pipeline | — |
| search_with_candle | Local BERT embeddings via Candle | embeddings-candle |
| search_with_openai | Cloud-based embeddings via OpenAI | embeddings-openai |
| multimodal_search | Text-to-image and image-to-image search | embeddings-multimodal |
We welcome contributions!
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Rust
93.0%
JavaScript
1.4%
Python
1.4%
PHP
1.4%
Ruby
1.3%
HTML
1.1%
Lexical Augmented Unified Retrieval Using Semantics
See the codeLaurus is a search platform written in Rust — built for Lexical Augmented Unified Retrieval Using Semantics. Built on a core library covering lexical search, vector search, and hybrid search, it provides multiple ready-to-use interfaces:
Whether embedded as a library, deployed as a standalone server, called from Python / Node.js / Ruby / PHP, run in the browser via WASM, or woven into AI workflows, Laurus is a composable search foundation.
Try Laurus directly in your browser — every sample runs entirely client-side via WebAssembly:
https://mosuka.github.io/laurus/demo/
| Sample | What it shows |
|---|---|
| basic | Japanese full-text, vector, and hybrid search with the unified query DSL |
| geo | Tokyo points-of-interest on a Leaflet map with bounding-box + text + vector queries |
| geo3d | Live aircraft on a CesiumJS 3D globe using geo3d_bbox / geo3d_nearest (true ECEF 3D, including altitude) |
Comprehensive documentation is available online:
Strict / Dynamic / Ignore policies for fine-grained control.Laurus is organized as a Cargo workspace with 9 crates:
| Crate | Description |
|---|---|
laurus | Core search library — schema, analysis, indexing, search, and storage |
laurus-cli | Command-line interface with REPL for interactive search |
laurus-server | gRPC server with HTTP gateway for deploying Laurus as a service |
laurus-mcp | MCP server for AI assistants (Claude, etc.) via stdio transport |
laurus-python | Python bindings (PyPI package) built with PyO3 and Maturin |
laurus-nodejs | Node.js bindings (npm package) built with NAPI-RS |
laurus-wasm | WebAssembly bindings (npm package) built with wasm-bindgen |
laurus-ruby | Ruby bindings (RubyGems package) built with magnus and rb-sys |
laurus-php | PHP bindings (PHP extension) built with ext-php-rs |
The laurus crate provides optional feature flags for embedding support:
| Feature | Description |
|---|---|
embeddings-candle | Local BERT embeddings via Candle |
embeddings-openai | Cloud-based embeddings via the OpenAI API |
embeddings-multimodal | CLIP-based multimodal (text + image) embeddings |
embeddings-all | Enable all embedding backends |
use laurus::lexical::{TermQuery, TextOption};
use laurus::storage::memory::MemoryStorageConfig;
use laurus::storage::{StorageConfig, StorageFactory};
use laurus::{Document, Engine, LexicalSearchRequest, Schema, SearchRequestBuilder};
#[tokio::main]
async fn main() -> laurus::Result<()> {
// 1. Create storage
let storage = StorageFactory::create(StorageConfig::Memory(MemoryStorageConfig::default()))?;
// 2. Define schema
let schema = Schema::builder()
.add_text_field("title", TextOption::default())
.add_text_field("body", TextOption::default())
.build();
// 3. Create engine
let engine = Engine::new(storage, schema).await?;
// 4. Index documents
engine
.add_document(
"doc1",
Document::builder()
.add_text("title", "Introduction to Rust")
.add_text(
"body",
"Rust is a systems programming language focused on safety and performance.",
)
.build(),
)
.await?;
engine
.add_document(
"doc2",
Document::builder()
.add_text("title", "Python for Data Science")
.add_text(
"body",
"Python is a versatile language widely used in data science and machine learning.",
)
.build(),
)
.await?;
engine.commit().await?;
// 5. Search
let results = engine
.search(
SearchRequestBuilder::new()
.lexical_search_request(LexicalSearchRequest::new(Box::new(TermQuery::new(
"body", "rust",
))))
.limit(5)
.build(),
)
.await?;
for hit in &results {
println!("score={:.4}", hit.score);
}
Ok(())
}
You can find usage examples in the laurus/examples/ directory:
| Example | Description | Feature Flag |
|---|---|---|
| quickstart | Basic full-text search | — |
| lexical_search | All query types (Term, Phrase, Boolean, Fuzzy, Wildcard, Range, Geo, Span) | — |
| vector_search | Semantic similarity search with embeddings | — |
| hybrid_search | Combining lexical and vector search with fusion | — |
| geo3d_search | 3D ECEF geographic search (sphere, bounding box, k-NN) | — |
| synonym_graph_filter | Synonym expansion in analysis pipeline | — |
| search_with_candle | Local BERT embeddings via Candle | embeddings-candle |
| search_with_openai | Cloud-based embeddings via OpenAI | embeddings-openai |
| multimodal_search | Text-to-image and image-to-image search | embeddings-multimodal |
We welcome contributions!
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Rust
93.0%
JavaScript
1.4%
Python
1.4%
PHP
1.4%
Ruby
1.3%
HTML
1.1%