Dynamic Stop Words Identification:
Implemented identifyStopWords function to perform frequency analysis on business overviews:
Identify terms that appear in more than 10% of business overviews as stop words
Build Inverted Index:
Filter out stop words from the tokenized terms
Additional Improvements:
Ensured efficient caching of search queries that produced results were greater than one to enhance performance.
Saved all cached items for each user.
Key Changes
Custom Cache Implementation:
Developed a Cache class to handle in-memory caching of search results.
Implemented LRU (Least Recently Used) eviction policy to manage cache size and optimize performance.
Added periodic cleanup of expired cache entries to maintain cache accuracy.
Caching Integration in Search Endpoint:
Integrated the custom cache class into the /api/search endpoint.
Configured the search endpoint to check the cache before querying the database.
Implemented cache set operations to store personalized search results and improve subsequent search queries.
New Changes
Dynamic Stop Words Identification: Implemented identifyStopWords function to perform frequency analysis on business overviews: Identify terms that appear in more than 10% of business overviews as stop words
Build Inverted Index: Filter out stop words from the tokenized terms
Additional Improvements:
Key Changes
Custom Cache Implementation:
Caching Integration in Search Endpoint: