# Upsert a document with unique id but same fields and different values

**URL:** <https://discuss.elastic.co/t/upsert-a-document-with-unique-id-but-same-fields-and-different-values/321403>\
**Category:** Logstash\
**Created:** [December 16, 2022, 11:24am UTC](https://discuss.elastic.co/t/upsert-a-document-with-unique-id-but-same-fields-and-different-values/321403 "2022-12-16T11:24:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [December 16, 2022, 11:24am UTC](https://discuss.elastic.co/t/upsert-a-document-with-unique-id-but-same-fields-and-different-values/321403/1 "2022-12-16T11:24:08Z")

</div>

Hi,

I have two events with same id idRda like the following, I need to unify the logs in one document, but adding two fields "timestamp1" and "timestamp2"

example:  
idRda:[4040477]  
timestamp1:[1670939520399]  
timestamp2:[1670939526203]

```auto
"message": "2022-12-13 14:52:00.399 {[ACTIVE] ExecuteThread: 5 for queue: weblogic.kernel.Default (self-tuning)} INFO idRda:[4040477] timestamp:[1670939520399]",
"message": "2022-12-13 14:52:06.203 {[ACTIVE] ExecuteThread: 12 for queue: weblogic.kernel.Default (self-tuning)} INFO idRda:[4040477] timestamp:[1670939526203]", 

```

Thank you  
Regards

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 13, 2023, 11:24am UTC](https://discuss.elastic.co/t/upsert-a-document-with-unique-id-but-same-fields-and-different-values/321403/2 "2023-01-13T11:24:59Z")

</div>

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