I have set up client for elasticsearch using elastic4s which stores Person case class:
case class Person(id: String, name: String)
How can I get specific person by id and convert GetResponse to this case class? What I'm trying to do is:
client.execute{
get(id).from(index, `type`).
}
which returns Future[Response[GetResponse]]
I have not touched elastic4s in a while, but as far as I remember you need to provide a specific HitReader for response
https://github.com/sksamuel/elastic4s#hitreader-typeclass