Textora is a distributed full-text search engine designed to be lightweight, fast, and scalable. Built in Rust, it leverages the power of Tantivy for indexing and searching, aiming to provide a robust alternative to Elasticsearch with a smaller footprint and memory safety guarantees.
Textora allows you to create indexes, index documents, and perform complex queries (boolean, range, phrase, etc.) via a simple RESTful API.
- High Performance: Built on top of Tantivy, providing fast indexing and sub-second search latencies.
- Memory Safe: Logic is written in safe Rust, ensuring stability and preventing common memory bugs.
- REST API: Easy-to-use JSON API for all operations.
- Distributed Architecture: (Experimental) Support for clustering and distributed consensus via Raft.
- Configurable: extensive configuration options for memory usage, commit policies, and more.
- Rust: Stable channel (1.39+)
- Cargo
Clone the repository and build using Cargo:
git clone https://github.com/Alkamal01/Textora.git
cd Textora
cargo build --releaseAfter building, you can start the server:
./target/release/textoraYou should see the startup banner:
_______ __
/_ __/__ ____/ /____ ________ _
/ / / _ \/ __ \/ __/ _ \/ ___/ _ `/
/_/ \___/_/ /_/\__/\___/_/ \_,_/
Textora Search Engine
INFO textora::index > Indexes: []
Verify it's running:
curl -X GET http://localhost:8080/Response:
{
"name": "Textora Search",
"version": "0.1.1"
}Textora looks for a configuration file in config/config.toml by default.
host = "127.0.0.1"
port = 8080
path = "data/"
writer_memory = 200000000
log_level = "info"
json_parsing_threads = 4- host: The IP address to bind to (default: 0.0.0.0)
- port: The port to listen on (default: 8080)
- path: Directory to store index data.
- writer_memory: Memory in bytes for the index writer buffer.
- log_level: Logging verbosity (info, debug, trace, etc.).
Textora supports bulk indexing.
Textora supports various query types including Term, Phrase, Range, and Boolean queries.
{ "query": {"term": {"test_text": "document" } }, "limit": 10 }{ "query": {"phrase": {"test_text": {"terms": ["search", "engine"] } } }, "limit": 10 }{ "query": {"bool": {"must": [ { "term": { "test_text": "rust" } } ], "must_not": [ {"range": {"year": { "lt": 2015 } } } ] } } }This project is licensed under the MIT License.