A lightweight search engine for Python applications
Project description
# SearchForge
A lightweight full-text search engine built in Python.
SearchForge provides fast document indexing, ranking, fuzzy search, autocomplete, highlighting, filtering and persistent storage.
## Features
- Full-text search
- Inverted index based indexing
- TF-IDF and BM25 ranking
- Tokenization and normalization
- Stop word removal
- Fuzzy search
- Autocomplete suggestions
- Metadata filtering
- Highlighted search results
- Persistent document storage
- Persistent index storage
- Search analytics
- Command line interface (CLI)
## Installation
Clone the repository:
```bash
git clone <repository-url>
cd searchforge
Install:
pip install -e .
CLI Usage
Add a document:
searchforge add sample.txt
Search:
searchforge search "python"
View analytics:
searchforge stats
Check version:
searchforge --version
Python Usage
from searchforge import SearchEngine
engine = SearchEngine()
engine.add_document(
1,
"Python Django Developer"
)
results = engine.search(
"python"
)
for result in results:
print(result.document_id, result.score)
Architecture
SearchForge
├── Tokenizer
├── Normalizer
├── Stop Words
├── Inverted Index
├── Query Processor
├── Ranking Engine
│ ├── TF-IDF
│ └── BM25
├── Storage
├── CLI
└── Analytics
Development
Run tests:
pytest
License
MIT License
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 Distribution
searchforge-0.1.0.tar.gz
(11.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file searchforge-0.1.0.tar.gz.
File metadata
- Download URL: searchforge-0.1.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54387a91f3c62c8ead2f5de2013ebc0cb2e230eed5d6bdb7329452610b4a3ce3
|
|
| MD5 |
663d11541fc3e3a56183e2707f5f0a83
|
|
| BLAKE2b-256 |
652bbec6f14c0d76ba1026415e24d00809c7820cada494cff8a6f479636bfd04
|
File details
Details for the file searchforge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: searchforge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea87fe5b16b0eb060bb4c9f7e45bbaa41105533c012c74c45f55fc48b3eb11e
|
|
| MD5 |
2793a52ceaeb67a5d996d846ce9a3473
|
|
| BLAKE2b-256 |
2f220e8b4d326b5a6e716210d0351f719afd04f1156c95e8816e9f94b0446534
|