jillesvangurp / kt-search

Multi platform kotlin client for Elasticsearch & Opensearch with easily extendable Kotlin DSLs for queries, mappings, bulk, and more.
MIT License
95 stars 23 forks source link

[BUG] Bulk update using doc #55

Closed indra-an closed 1 year ago

indra-an commented 1 year ago

I tried bulk update from version 2.0.0-RC-7 but got an issue, the values has double quote

this is my code

searchClient.bulk(refresh = Refresh.WaitFor) {
   update(
       doc = TestDocument(name="test", age= 20),
       index = "es-index",
       id = "1",
   )
}

expected result

{
   "name": "test",
   "age": 20
}

actual result

{
   "name": "\"test\"",
   "age": "20"
}

ES Version 7.12.1

jillesvangurp commented 1 year ago

Thanks for reporting, I will look into this.