Release 1.13.0
Features:
- New POST /search endpoint to enable creation of indexes for authorised users
- GET /search endpoint response structure updated to return highlight object containing embedded tags around terms that matched query term
- Refactor code to enable the ability to write component tests against the service layer
- Component tests added for GET /search endpoint
New POST /search endpoint changes, further info:
-
The SearchAPI now contains the new ElasticSearch client as well as the old one. The new one has been named dpESClient and the old one has been renamed to deprecatedESClient, this is needed as one client talks to elasticsearch 2.4.2 and the other to elasticsearch 7.10 as we slowly migrate to new elasticsearch cluster.
-
An endpoint has been added, which allows a POST request to be made, to create an empty ElasticSearch index. The endpoint is POST /search
Example (to create a new empty index):
http://localhost:23900/search
Response:
{
"IndexName": "ons1636628199823915"
}
NB. The new endpoint requires authorisation of type 'Bearer Token'. The token it needs is the SERVICE_AUTH_TOKEN so this must be set appropriately in whatever environment is being used. This also means that Zebedee (and Vault, which Zebedee has a dependency on) must now also be running in the same environment as this service. The README has been updated to reflect this.
- The registerCheckers function now gets the new ES client from the service instead of creating its own new ES client.