This is a spring boot application. We require below software prerequisites.
- JDK Install (1.8.0_91)
- STS (Spring Tool Suite)
- Mongodb installed version 3.0.6
- Gradle Version 4.6
- Import project on Spring Tool Suite
- Go to https://github.com/PiyushChaudhari/search-engin/blob/master/src/main/resources/application.properties and change below details
'spring.data.mongodb.host'
mongodb running host name
'spring.data.mongodb.port'
mongodb running port
'klevu.search.data.path'
location of your data file
'klevu.search.product.top'
how many top production you want as integer.
-
Run mongodb.
-
Run your application.
-
For 3rd point of assignment
Given this product ID, find out products that the other customers are buying along with the one provided.
You need to hit url http://localhost:8080/select-data/product/{id}
on your browser and replace {id}
wiht product ID
- For 4th point of assignment
Order them based on their frequency (descending) and return the top 5 products (id and name) as recommendations (JSON format)
You need to hit url http://localhost:8080/select-data/top-product
on your browser