Skip to main content

A lightweight full-text 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, metadata filtering, persistent storage, and a command-line interface.

Installation

Install from PyPI (Recommended)

pip install searchforge

Install from Source

git clone https://github.com/<your-github-username>/searchforge.git
cd searchforge
pip install -e .

PyPI

https://pypi.org/project/searchforge/

Features

  • Full-text search
  • Inverted index based indexing
  • TF-IDF ranking
  • Tokenization and normalization
  • Stop word removal
  • Fuzzy search
  • Autocomplete suggestions
  • Metadata filtering
  • Highlighted search results
  • Persistent document storage
  • Persistent search index
  • Search analytics
  • Command Line Interface (CLI)

CLI Usage

Add a document

searchforge add sample.txt

Search documents

searchforge search "python"

View search analytics

searchforge stats

Show 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)
    print(result.score)

Project Architecture

SearchForge
│
├── Tokenizer
├── Normalizer
├── Stop Words
├── Inverted Index
├── Query Processor
├── Ranking Engine
│   └── TF-IDF
├── Storage
├── Analytics
├── CLI
└── Search Engine

Development

Clone the repository:

git clone https://github.com/<your-github-username>/searchforge.git
cd searchforge

Create a virtual environment:

python -m venv .venv

Activate the environment:

macOS/Linux

source .venv/bin/activate

Windows

.venv\Scripts\activate

Install dependencies:

pip install -e .

Run tests:

pytest

Build the package:

python -m build

Publish to PyPI:

twine upload dist/*

Requirements

  • Python 3.10+

License

MIT License.

Author

Ravi Singh Kalakoti

Project details


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.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

searchforge-0.1.1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file searchforge-0.1.1.tar.gz.

File metadata

  • Download URL: searchforge-0.1.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for searchforge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b263c959d12158e610760f36350174339151bbe637719fb9695585fbeea5bc37
MD5 d3fa3942296d0c004ba0e54e6324efbc
BLAKE2b-256 d03901eebc01e0dad6633ee1b5397386dc81368ba6deba81453391951c21bb58

See more details on using hashes here.

File details

Details for the file searchforge-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: searchforge-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for searchforge-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6e3fac1eb67ffa0aa5b1e8b7a1d1e247b84c96449f1a5243d87a860278e9d88
MD5 1deb9b12cb3ccf7f7b425eef8b8f3003
BLAKE2b-256 11edc962750ff7a645cbc90ebdecc40d4c68ce8331899ade5f88290c7a2e0500

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page