Challenge Overview
A Web Endpoint (Search API) is needed to query the Products listed in the Solr Index.
The client will enter keywords to search on and may optionally enter which row number to start and how many rows to return. The API will return results with a relevancy ranking score by the Solr database. The Java API will be based on the following specs as defined in the OpenAPI 3.0 specs referenced by the Swaggerhub link below. Unit tests are expected to be written as part of the challenge.
https://app.swaggerhub.com/apis/tc3/product-search-api/1.0.0
Please refer to the Swaggerhub link above for the definitive specs. As an example:
For a POST request with
start: 1,
rows: 10 }
Example Response
"id": 101,
"manufacturer_name": "UNIQLO",
"url": "https://www.uniqlo.com/us/en/men-ultra-stretch-skinny-fit-jeans-408490.html",
"last_modified_at": "2019-07-21T17:32:28Z",
"score": 1.00
}, {
"id": 58,
"manufacturer_name": "UNIQLO",
"url": "https://www.uniqlo.com/us/en/men-ultra-stretch-skinny-fit-jeans-417636.html",
"last_modified_at": "2019-06-03T10:15:58Z",
"score": 0.98
}, .. ]
Note, the endpoint for the API is search_products/ and we be using POST instead of GET to pass the query arguments to the endpoint. This endpoint will support pagination by accepting start and rows as optional parameters.
In case of a bad request such as JSON object with wrong format or no JSON object or JSON object without any keywords specified for the query parameter, the API will send a RESPONSE code of 400. In addition in case of an internal server error the RESPONSE code with be 500.
The schema of Solr Index is the following:

The client will enter keywords to search on and may optionally enter which row number to start and how many rows to return. The API will return results with a relevancy ranking score by the Solr database. The Java API will be based on the following specs as defined in the OpenAPI 3.0 specs referenced by the Swaggerhub link below. Unit tests are expected to be written as part of the challenge.
https://app.swaggerhub.com/apis/tc3/product-search-api/1.0.0
Please refer to the Swaggerhub link above for the definitive specs. As an example:
For a POST request with
- endpoint: /search_products
- Request Body (JSON):
- Search by a single keyword
- Search by multiple keywords with offset (start) and limit (rows)
start: 1,
rows: 10 }
Example Response
- Response Body (JSON):
"id": 101,
"manufacturer_name": "UNIQLO",
"url": "https://www.uniqlo.com/us/en/men-ultra-stretch-skinny-fit-jeans-408490.html",
"last_modified_at": "2019-07-21T17:32:28Z",
"score": 1.00
}, {
"id": 58,
"manufacturer_name": "UNIQLO",
"url": "https://www.uniqlo.com/us/en/men-ultra-stretch-skinny-fit-jeans-417636.html",
"last_modified_at": "2019-06-03T10:15:58Z",
"score": 0.98
}, .. ]
Note, the endpoint for the API is search_products/ and we be using POST instead of GET to pass the query arguments to the endpoint. This endpoint will support pagination by accepting start and rows as optional parameters.
In case of a bad request such as JSON object with wrong format or no JSON object or JSON object without any keywords specified for the query parameter, the API will send a RESPONSE code of 400. In addition in case of an internal server error the RESPONSE code with be 500.
The schema of Solr Index is the following:
Final Submission Guidelines
- Full submission that implements the API as well as the unit tests
- Test report (including coverage) need to be generated after running the tests
- Detailed readme in markdown format explaining how to configure, run and verify your submission