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.
- 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.
git clone https://github.com/alireza-haeri/Searchify.git
cd Searchify
You need Elasticsearch 9.x.
Pull it from Docker Hub:
docker compose up -d
dotnet build
dotnet run --project src/Searchify.Api
GET /api/books/search
?title=elastic
&categories=Database
&page=1
&pageSize=10
&sortBy=rating
&sortOrder=desc
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 }
]
- .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