Obviously, the most common action in Elasticsearch is searching. Elastic4s leverages the query DSL, which brings a type-safe definition for the queries to Scala. One of the most common advantages of this functionality is that, as Elasticsearch evolves, in Scala code via elastic4s, you can have deprecation or your compilation may break, requiring you to update your code.
In this recipe, we will see how to execute a search, retrieve the results, and convert them into typed Domain objects (classes) without the need to write a serializer/deserializer for our data.