Searchify
A powerful book search API with advanced filtering, full-text search, and analytics-ready endpoints.
Install / Use
/learn @alireza-haeri/SearchifyREADME
Searchify
<br>A modern, high-performance Book Search API powered by .NET 9, Elasticsearch 9, and Docker.
Built to demonstrate real-world search scenarios, optimized queries, and a production-ready backend setup.
✨ Features
- Full-text search across title, author, description, categories, and publisher fields.
- Smart suggestions powered by Elastic's
completionsuggesters. - Advanced filtering & sorting for precise search results.
- Top books & analytics endpoints for curated insights.
- Containerized setup with
docker-composefor Elasticsearch + API.
🚀 Quick Start
1. Clone the repository
git clone https://github.com/alireza-haeri/Searchify.git
cd Searchify
2. Start Elasticsearch & Kibana
You need Elasticsearch 9.x.
Pull it from Docker Hub:
docker compose up -d
3. Run the API
dotnet build
dotnet run --project src/Searchify.Api
<br>
📡 API Highlights
| Method | Endpoint | Description |
|---------|----------|-------------|
| |
/api/books/search | Advanced multi-field search with filters, pagination, and sorting |
| |
/api/books/suggestion | Smart type-ahead suggestions |
| |
/api/books/topbooks | Get top-rated books, with optional category filtering |
| |
/api/books/categories | Aggregated stats on all categories |
| |
/api/books/publishers | Insights on publishers and their average ratings |
| |
/api/book/{isbn} | Get a specific book by ISBN |
| |
/api/book | Add a new book |
| |
/api/book/{isbn} | Update book info |
| |
/api/book/{isbn} | Delete a book |
🔍 Search Example
GET /api/books/search
?title=elastic
&categories=Database
&page=1
&pageSize=10
&sortBy=rating
&sortOrder=desc
💡 Suggestion Example
GET /api/books/suggestion?q=learn
Response
[
{ "title": "Learning Elasticsearch", "author": "John Doe", "rating": 4.7 },
{ "title": "Learning .NET 9", "author": "Jane Smith", "rating": 4.5 }
]
<br>
🛠 Built With
- .NET 9 Minimal APIs — clean, lightweight endpoints
- Elasticsearch 9 — advanced search, aggregations, and suggestions
- Docker & Docker Compose — seamless local setup for API + Elastic stack
- FluentValidation — clean input validation
