In this position you will be building a search platform and exposing it as a web interface. The aim of this exercise is to test your basic web development skills and your ability to learn new libraries.
In this exercise, you will develop a webpage. The webpage should consist of a simple form, with fields for entering a URL target_url, a number N, and a button. Upon a button click, your webpage should make an ajax request to target_url. The ajax request will return a JSON object containing a list of products with each product having a title and price. The webpage should should display N cheapest products in a table.
N <= 5The JSON returned by the target_url will be of the following format, shown below. This example JSON contains two products named title_4 and title_9.
{
"took": 3,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 10,
"max_score": 1,
"hits": [
{
"_index": "library",
"_type": "apps",
"_id": "4",
"_score": 1,
"_source": {
"title": "title_4",
"price": "100"
}
},
{
"_index": "library",
"_type": "apps",
"_id": "9",
"_score": 1,
"_source": {
"title": "title_9",
"price": "9000"
}
}
]
}
}
To test your webpage, you can use the following URL, which will return 10 products named from title_1 to title_10.
https://search-turingvr-ksoyyoputdilin32nq4p5wkg3q.us-west-2.es.amazonaws.com/library/_search
Email Prasanth Krishnan with your resume and source code for the completed exercise.