Google-inspired full-stack search engine prototype featuring asynchronous web crawling, inverted indexing, BM25 ranking, PageRank scoring, autocomplete, spell correction, and a custom search analytics dashboard.
Built with Python, FastAPI, SQLite, and Vanilla JavaScript, focused on information retrieval systems, ranking algorithms, backend engineering, and search architecture design.
- Asynchronous Web Crawler — BFS-based multi-level crawler with robots.txt compliance
- Inverted Index Engine — Positional indexing with optimized posting lists
- Hybrid Ranking System — BM25 relevance scoring + PageRank authority fusion
- Autocomplete Engine — Trie-based query suggestion system
- Spell Correction — Edit-distance typo handling and correction
- Search Analytics Dashboard — Indexed pages, query stats, and ranking insights
- Snippet Generation — Context-aware keyword highlighting
- Full-Stack Search UI — Responsive custom search interface with admin controls
- REST API Backend — FastAPI-powered search endpoints
- Lightweight Architecture — SQLite-based retrieval engine with modular services
Query Input
↓
Spell Correction
↓
Tokenization + Query Parsing
↓
Posting List Retrieval
↓
BM25 Ranking
↓
PageRank Fusion
↓
Snippet Generation
↓
Pagination
↓
Ranked Results
Features:
- BFS traversal strategy
- robots.txt compliance
- Duplicate URL detection
- Configurable crawl depth
- Async crawling with rate limiting
Supports:
- Inverted indexing
- Positional indexing
- Token normalization
- Posting-list generation
- Term-frequency statistics
Implements:
- Okapi BM25 ranking
- PageRank authority scoring
- Hybrid rank fusion
- Phrase-aware retrieval
- Query parsing optimization
Includes:
- Trie-based autocomplete
- Prefix suggestions
- Typo correction
- Edit-distance matching
- Query refinement
Tracks:
- Indexed pages
- Unique indexed terms
- Query statistics
- Discovered links
- Top-ranked pages
- Crawl metrics
| Layer | Technology |
|---|---|
| Backend | Python 3.11 |
| API Framework | FastAPI |
| Database | SQLite |
| Crawling | aiohttp + BeautifulSoup4 |
| Frontend | HTML5, CSS3, Vanilla JavaScript |
| Templating | Jinja2 |
| Ranking | BM25 + PageRank |
| Data Structures | Trie, Inverted Index |
| Architecture | Modular search engine pipeline |
MiniSearch-Engine/
├── backend/
│ ├── api/
│ │ ├── database.py
│ │ ├── main.py
│ │ ├── routes.py
│ │ └── search.py
│ │
│ ├── crawler/
│ │ └── spider.py
│ │
│ ├── indexer/
│ │ ├── autocomplete.py
│ │ ├── indexer.py
│ │ └── spell_correct.py
│ │
│ ├── ranker/
│ │ └── pagerank.py
│ │
│ └── data/
│ └── search.db
│
├── frontend/
│ ├── static/
│ └── templates/
│
├── tests/
│ ├── test_autocomplete.py
│ ├── test_crawler.py
│ ├── test_indexer.py
│ └── test_pagerank.py
│
├── screenshots/
│ ├── architecture.png
│ ├── local-search-engine.png
│ ├── system-stats.png
│ └── web-crawler.png
│
├── requirements.txt
├── pytest.ini
└── README.md- Python 3.11+
- pip
# 1. Clone the repository
git clone https://github.com/manyahh07/MiniSearch-Engine.git
# 2. Enter project directory
cd MiniSearch-Engine
# 3. Create virtual environment
python -m venv venv
# Windows
venv\Scripts\activate
# macOS / Linux
source venv/bin/activate
# 4. Install dependencies
pip install -r requirements.txtuvicorn backend.api.main:app --reload --port 8000Open:
http://127.0.0.1:8000- Open admin panel
- Enter seed URLs
- Crawl websites asynchronously
- Build inverted indexes
- Generate PageRank scores
- Query indexed documents
- Analyze ranked search results
Combines:
- BM25 content relevance
- PageRank authority scoring
- Rank fusion normalization
for balanced search quality.
Implements positional indexing for:
- Fast term lookup
- Phrase matching
- Efficient retrieval
- Scalable posting-list traversal
Crawler uses asynchronous networking for efficient multi-page crawling with configurable limits and duplicate protection.
Supports:
- Autocomplete
- Spell correction
- Prefix matching
- Query parsing
- Contextual snippets
- Information Retrieval Systems
- Search Engine Architecture
- Ranking Algorithms
- Backend API Engineering
- Asynchronous Programming
- Database Systems
- Full-Stack Development
- Data Structures & Algorithms
- Query Optimization
- Search Analytics
- Semantic vector search
- Embedding-based ranking
- Redis caching
- PostgreSQL migration
- Distributed crawling workers
- Query caching
- Authentication system
- Docker deployment
- Cloud hosting
MIT © Manya Singh



