Search service with Symfony and Elasticsearch
Budget: €30 – €250 EUR
An Elasticsearch microservice is to be implemented in PHP 8.0. Symfony version 6.0 has to be used as the framework for the microservice. The microservice must implement the following processes:
1. creation of a search index
2. output of search results for a search term
Creation of a search index
The creation of the search index is to be triggered externally. For this purpose an endpoint has to be provided, which receives the values for product name, manufacturer and product category formated as JSON and updates / creates the search index from these values. The endpoint and the search index are to be implemented extensible by further attributes. A successful call shall be answered with a HTTP status code 200, erroneous and failed calls shall return a HTTP status code that best describes the error.
Output of search results for a search term
For the output of the search results another endpoint has to be implemented, which receives the search term in a GET request and returns the search result as a list. The search term is transmitted URL-encoded as a query parameter with the name "q". If the search result is empty, the HTTP status code 204 is used to confirm a successful response. If one or more results are found, the request should be answered with the HTTP status code 200 and the result returned in JSON format. Erroneous and failed requests shall be answered with an HTTP status code that best describes the error.
Steps
1. definition of the API in OpenAPI 3
2. deployment of the Skeleton project with the interfaces from the API definition in GIT
3. implementation of the search index creation
4. implementation of the search result output
1. creation of a search index
2. output of search results for a search term
Creation of a search index
The creation of the search index is to be triggered externally. For this purpose an endpoint has to be provided, which receives the values for product name, manufacturer and product category formated as JSON and updates / creates the search index from these values. The endpoint and the search index are to be implemented extensible by further attributes. A successful call shall be answered with a HTTP status code 200, erroneous and failed calls shall return a HTTP status code that best describes the error.
Output of search results for a search term
For the output of the search results another endpoint has to be implemented, which receives the search term in a GET request and returns the search result as a list. The search term is transmitted URL-encoded as a query parameter with the name "q". If the search result is empty, the HTTP status code 204 is used to confirm a successful response. If one or more results are found, the request should be answered with the HTTP status code 200 and the result returned in JSON format. Erroneous and failed requests shall be answered with an HTTP status code that best describes the error.
Steps
1. definition of the API in OpenAPI 3
2. deployment of the Skeleton project with the interfaces from the API definition in GIT
3. implementation of the search index creation
4. implementation of the search result output