私はscala 2.11.11、elastic4s 5.4.5、elastic4s-circe 5.4.5を使用しています
import com.sksamuel.elastic4s.ElasticDsl._
import com.sksamuel.elastic4s.TcpClient
import com.sksamuel.elastic4s.circe._
import io.circe.generic.auto._
object Test {
val client: TcpClient = ???
case class Something(a: Map[AnotherThing, Int])
case class AnotherThing(b: Int)
val smth = Something(Map.empty)
client.execute {
indexInto("index" / "type").doc(smth)
}
}
これはコンパイルされません:
could not find implicit value for evidence parameter of type com.sksamuel.elastic4s.Indexable[net.lizeo.bd4m.storage.Test.Something]
indexInto("index" / "type").doc(smth)
ドキュメントによると:
選択したライブラリのインポートを以下に追加するだけで、それらの暗黙的なスコープを使用して、任意のタイプを doc に渡すことができ、Indexable が自動的に派生します。
Elastic4s -circimport io.circe.generic.auto._
ありおよびimport com.sksamuel.elastic4s.circe._
用。
私は何が欠けていますか?