Cognitive Search task description
Task Overview
Develop a ServiceSearch infrastructure service for the ShareThrift application that abstracts search capabilities. This service should implement ServiceBase from @cellix/api-services-spec and allow seamless switching between Azure Cognitive Search and a local mock alternative (e.g., LiQE or Lunr.js) based on runtime configuration (via environment variables). Refer to AHP Cognitive Search implementation to understand what capabilities the search service should provide.
Requirements
- Implement a
ServiceSearch class/interface that extends ServiceBase and serves as the entry point for all search operations in the application.
- The service should detect configuration from environment variables to determine whether to use Azure Cognitive Search or a mock implementation.
- Explore and document local search options such as LiQE and Lunr.js for the mock implementation.
- Provide a mock implementation that mimics the Azure Cognitive Search API surface as closely as possible.
- Ensure easy extensibility for future search providers.
- Add example usage/tests demonstrating both real and mock search flows.
Deliverables
ServiceSearch infrastructure service class/interface implementing ServiceBase from @cellix/api-services-spec
- Azure Cognitive Search integration
- Mock implementation using LiQE and/or Lunr.js
- Documentation and example code for switching between implementations using environment variables
- Unit/integration tests for both modes
References
Cognitive Search task description
Task Overview
Develop a
ServiceSearchinfrastructure service for the ShareThrift application that abstracts search capabilities. This service should implementServiceBasefrom@cellix/api-services-specand allow seamless switching between Azure Cognitive Search and a local mock alternative (e.g., LiQE or Lunr.js) based on runtime configuration (via environment variables). Refer to AHP Cognitive Search implementation to understand what capabilities the search service should provide.Requirements
ServiceSearchclass/interface that extendsServiceBaseand serves as the entry point for all search operations in the application.Deliverables
ServiceSearchinfrastructure service class/interface implementingServiceBasefrom@cellix/api-services-specReferences