A demo framework created in order to impart knowledge to the students on how to use Java API for Elasticsearch in grails project, which is basically an API that can respond to JSON requests and return JSON response.
For demonstration: Example request=>
POST Request URI: http://localhost:8080/request, where request is the name of our controller and 8080 is the port in which our project is running.
Sample Request Body:
{
"service": "accounts",
"task": "getAccountById",
"accountId": "25"
}
Sample JSON Response for the Request Above
{
"accountInfo": {
"account_number": 25,
"firstname": "Virginia",
"address": "171 Putnam Avenue",
"balance": 40540,
"gender": "F",
"city": "Nicholson",
"employer": "Filodyne",
"state": "PA",
"age": 39,
"email": "virginiaayala@filodyne.com",
"lastname": "Ayala"
}
}
- JDK (at least JDK 8)
- Elasticsearch (Refer Setting Up Guide.docx available in the repository)
- Bulk index accounts.json file to your Elasticsearch using curl.
3.3.9
Via Maven Repo-> "org.elasticsearch:elasticsearch:6.7.1"