Add Runtime Field By UpdateQueryAsync

Hello all, i am new to elasticsearch, i am trying to add a new field(runtime field) by UpdateByQueryAsync in my index(it already created), i did some research and i saw that we can add a new fiel by this syntax :

var updateByQueryResponse = await client.UpdateByQueryAsync<Document>(u => u
            .Query(q => q.MatchAll())
            .Script("ctx._source.isActive = true")

but in this case isActive will be indexed and for my case i want it to be an runtime field any suggestions please

Update by query updates documents just as you stated. Runtime fields are defined in mappings and processed at query time. You can not add runtime fields through update by query.

thank you sir

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.