我正在尝试将 ElasticSearch 与 Play 2.3.7 Scala 一起使用。我已经安装了弹性搜索,添加了一个索引,并让它运行起来(使用 curl 测试)。但是,我正在努力让 elastic4s 在播放控制器中工作。
我使用简单的远程 url 创建了客户端
val client = ElasticClient.remote("localhost", 9300)
然后我尝试在客户端上执行。
client.execute {
ElasticDsl.index.into("test/test").id(id).fields (
"title" -> title,
"uid" -> uid
)
}
这是在 Action 内执行的,但出现以下错误。
could not find implicit value for parameter executable: com.sksamuel.elastic4s.Executable[com.sksamuel.elastic4s.IndexDefinition,R,Q]