From elasticsearch > 2, there is no _timestamp
field. we have to explicitly populate time fields like created_on
and updated_on
One way i know to populate these fields is check item to be populated is already existing in Database using uid
(assume uid
generated on client side using some item properties). If item exists in Database, update all fields except created_on
. If item does not exist, create entry in database with item and created_on
equal to current time.
My questions are:
* Isn't checking every time i create/update redundant ??
* Is there any better way to implement created_on
and updated_on
logic on client side without redundant (without querying elasticsearch) ??
Aucun commentaire:
Enregistrer un commentaire