elasticsearch - Is it possible to create a document via an update? -
i have following case update documents may not exist yet:
- documents created specific calls (
calla
) preset_id
severalcalla
result in 1 document. set fieldfield1
in document. - independently, there call (
callb
) updates information existing document settingfield2
.
i ensure once document created, not overwritten subsequent calla
. calla
should update field1
, callb
- fieldb
.
it have been easy achieve _update
function did not manage have create document in first place. once document created _update
ok.
is there way go around limitation? code simpler if did not have first check if ercord exist , either create or update (as opposed have single call update or create if dcoument not exist yet)
Comments
Post a Comment