elastic4s
elastic4s copied to clipboard
Update `doc` with `NestedFieldValue`
Hi,
Long story short:
Documentation: https://github.com/sksamuel/elastic4s/blob/master/docs/update.md#updates
client.execute {
updateById("scifi", "14").docAsUpsert(
NestedFieldValue("captain", Seq(SimpleFieldValue("james", "kirk")))
)
}
Code: https://github.com/sksamuel/elastic4s/blob/a7f80c710a911b763c0fdc408f1c8cd23780976a/elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/update/UpdateRequest.scala#L54
// Sets the field to use for updates when a script is not specified.
//def doc(value: FieldValue): UpdateDefinition = copy(documentSource = Seq(value))
There is only one function that I could apply FieldValue
and it is commented out.
But maybe I'm just blind.
Am I missing sth?
Cheers
Was removed in later version and docs out of date I guess.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.