About semlix
semlix is a fast, featureful full-text indexing and searching library implemented in pure Python. Based on the excellent Whoosh library, semlix extends it with modern semantic search capabilities while maintaining full backward compatibility. Programmers can use it to easily add search functionality to their applications and websites. Every part of how semlix works can be extended or replaced to meet your needs exactly.
What does "semlix" mean?
The name semlix stands for:
- Semantic - Understanding meaning and context beyond keywords
- Lexical - Traditional keyword matching (BM25/TF-IDF)
- Index - Fast, efficient indexing and retrieval
semlix combines all three: it indexes your documents, searches them using both lexical (keyword) and semantic (meaning-based) methods, then intelligently combines the results for superior search quality.
Some of semlix's features include:
- Pythonic API.
- Pure-Python. No compilation or binary packages needed, no mysterious crashes.
- Fielded indexing and search.
- Fast indexing and retrieval -- faster than any other pure-Python, scoring, full-text search solution I know of.
- Pluggable scoring algorithm (including BM25F), text analysis, storage, posting format, etc.
- Powerful query language.
- Pure Python spell-checker (as far as I know, the only one).
- Semantic search - Hybrid search combining traditional lexical matching (BM25/TF-IDF) with modern vector-based semantic similarity for understanding meaning beyond keywords.
semlix might be useful in the following circumstances:
- Anywhere a pure-Python solution is desirable to avoid having to build/compile native libraries (or force users to build/compile them).
- As a research platform (at least for programmers that find Python easier to read and work with than Java ;)
- When an easy-to-use Pythonic interface is more important to you than raw speed.
semlix is based on Whoosh, which was created and is maintained by Matt Chaput. Whoosh was originally created for use in the online help system of Side Effects Software's 3D animation software Houdini. Side Effects Software Inc. graciously agreed to open-source the code. semlix extends Whoosh with semantic search capabilities while honoring its pure-Python philosophy.
This software is licensed under the terms of the simplified BSD (A.K.A. "two clause" or "FreeBSD") license. See LICENSE.txt for information.
Two lexical engines
semlix has two lexical engines behind the same Index protocol: the pure-Python
semlix core (full feature set — query language, phrases, facets, highlighting,
disk-based/incremental) and a bm25s engine (in-memory BM25, ~40x faster to
index and ~57x faster to query, but bag-of-words only). The semantic / hybrid
layer works with either. See the engine guide (docs/source/engines.rst) to
choose.
Installing semlix
Requires Python 3.9+. Install from PyPI: https://pypi.org/project/semlix/
Basic installation:
pip install semlix
For semantic search capabilities:
pip install semlix[semantic]
For full semantic search with all providers and FAISS support:
pip install semlix[semantic-full]
Or using uv:
uv pip install semlix[semantic-full]
Semantic Search
semlix includes optional semantic search capabilities that combine traditional lexical matching with vector-based semantic similarity. This enables queries like "how to fix authentication issues" to match documents containing "resolving login problems" even without shared keywords.
Key features:
- Hybrid Search: Combines BM25/TF-IDF lexical search with semantic vector search
- Multiple Embedding Providers: Support for sentence-transformers, OpenAI, Cohere, and HuggingFace Inference API
- Flexible Vector Stores: Pure-Python NumPy backend for small datasets, FAISS backend for large-scale deployments
- Result Fusion: Multiple fusion algorithms (RRF, Linear, DBSF) for optimal ranking
- Backward Compatible: Existing Whoosh code continues to work without modification
Quick example:
>>> from semlix.index import create_in
>>> from semlix.fields import Schema, TEXT, ID
>>> from semlix.semantic import (
... HybridSearcher, HybridIndexWriter,
... SentenceTransformerProvider
... )
>>> from semlix.semantic.stores import NumpyVectorStore
>>>
>>> # Create schema and index
>>> schema = Schema(id=ID(stored=True, unique=True), content=TEXT(stored=True))
>>> ix = create_in("my_index", schema)
>>>
>>> # Create semantic components
>>> embedder = SentenceTransformerProvider("all-MiniLM-L6-v2")
>>> vector_store = NumpyVectorStore(dimension=embedder.dimension)
>>>
>>> # Index documents
>>> with HybridIndexWriter(ix, vector_store, embedder) as writer:
... writer.add_document(id="1", content="Python programming basics")
... writer.add_document(id="2", content="How to fix login issues")
>>>
>>> # Search with hybrid search
>>> searcher = HybridSearcher(ix, vector_store, embedder)
>>> results = searcher.search("authentication problems") # Matches "login issues"!
See the semantic search documentation for more details.
Project
- GitHub: https://github.com/semlix/semlix
- PyPI: https://pypi.org/project/semlix/
- Documentation: https://semlix.readthedocs.io/en/latest/
Metadata
Release files for semlix 3.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| semlix-3.2.2.tar.gz | 1.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| semlix-3.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.6 MB
Release files / semlix-3.2.2.tar.gz
| Download URL | semlix-3.2.2.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17223f29373f502bc521030994317dd3c777c6d7512d92cb8208368311be48d1
|
|
BLAKE2b-256 checksum How to use checksums |
29ec7aa047e913dd62acf6970ff9eab2b53d5ae42e6c9b0fc78e7ec2da63b414
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.
Transparency logRelease files / semlix-3.2.2-py3-none-any.whl
| Download URL | semlix-3.2.2-py3-none-any.whl |
|---|---|
| Size | 538.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4632b225f3006e3b0f8b98988155b87e915e866570b7611ea4344edcbc93994c
|
|
BLAKE2b-256 checksum How to use checksums |
285ac740ce3092f9aff0e70a4d84109d60c39082f02e27d44239bd49dd511899
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.
Transparency log