This Yandex.Practicum C++ course project implements document search and ranking with TF-IDF, minus-word filtering, request processing, and parallel execution using Intel TBB.
- TF-IDF Ranking: Ranks documents by relevance based on Term Frequency-Inverse Document Frequency.
- Minus-Words Support: Excludes documents containing specific words from search results.
- Thread-Safe Execution: Utilizes Intel TBB for efficient multi-threaded performance.
- Flexible Query Handling: Handles multiple queries and efficiently filters relevant results.
Doc id_1: white cat and yellow hat
Doc id_2: curly cat curly tail
Doc id_3: nasty dog with big eyes
Doc id_4: nasty pigeon john
and with -john
ACTUAL:
{ document_id = 2, relevance = 0.866434, rating = 1 }
{ document_id = 1, relevance = 0.173287, rating = 1 }
{ document_id = 3, relevance = 0.173287, rating = 1 }
BANNED:
{ document_id = 4, relevance = 0.231049, rating = 1 }
SearchServerowns the document index and ranking logic.ConcurrentMapsupports parallel result accumulation.- Query-processing helpers execute batches of searches.
RequestQueuetracks recent empty-result requests.
- Requires a C++17-compatible compiler and Intel oneTBB/TBB.
- Source and test helpers are under
Search_Server/. - The repository does not include a portable project-level build configuration.