I tried to run an example code of elastic4s, as follows,
import com.sksamuel.elastic4s.ElasticClient
import com.sksamuel.elastic4s.ElasticDsl._
object hw extends App {
val client = ElasticClient.local
client.execute(create index "bands")
client.execute { index into "bands/artists" fields "name"->"coldplay" }.await
val resp = client.execute { search in "bands/artists" query "coldplay" }.await
println(resp)
client.close
}
The program correctly prints the results, but it does not exit itself. I don't know if there are problems with my code or environment.