The search database is being changed from Opensearch to Elasticsearch. The Elasticsearch docker images are nearly half the size of Opensearch, and we aren't missing out on anything Opensearch offers (to my knowledge). The /api/health and /api/config endpoints don't need to be changed for the migration. Requirements for the migration to be considered complete are listed below.
Expected behaviors
On calling the /api/search endpoint, the search needs to
Establish a connection to the Elasticsearch backing service by initializing a client (client.ts)
Get the query string from the request header query
Use the client to search our index with a query that A) Supports partial searches i.e. Mich would yield Michael, Sar would yield Sarah, etc... B) Optionally search across different fields. Maybe you're searching for the name of a person, a curriculum, or a topic resource (we're looking to have the ability to specify fields via the request in the future).
Return the results or error
Close connection
Other requirements
Unit and integration tests appropriate to the migration Elasticsearch need to be added.
The openapi.yaml/swagger document/whatever-you-want-to-call-it needs to be updated to reflect the changes.
Update the readme.md with updated information on containers used, backing services, the disclaimer, etc.
Goal
The search database is being changed from Opensearch to Elasticsearch. The Elasticsearch docker images are nearly half the size of Opensearch, and we aren't missing out on anything Opensearch offers (to my knowledge). The
/api/health
and/api/config
endpoints don't need to be changed for the migration. Requirements for the migration to be considered complete are listed below.Expected behaviors
On calling the
/api/search
endpoint, the search needs toquery
Mich
would yieldMichael
,Sar
would yieldSarah
, etc... B) Optionally search across different fields. Maybe you're searching for the name of a person, a curriculum, or a topic resource (we're looking to have the ability to specify fields via the request in the future).Other requirements
Resources