# Issues during upsert for delta data indexing

**URL:** <https://discuss.elastic.co/t/issues-during-upsert-for-delta-data-indexing/18933>\
**Category:** Elasticsearch\
**Created:** [July 28, 2014, 7:17pm UTC](https://discuss.elastic.co/t/issues-during-upsert-for-delta-data-indexing/18933 "2014-07-28T19:17:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madhavan\_Ramachandra](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@Madhavan\_Ramachandra](https://discuss.elastic.co/u/Madhavan_Ramachandra)\
**Post date:** [July 28, 2014, 7:17pm UTC](https://discuss.elastic.co/t/issues-during-upsert-for-delta-data-indexing/18933/1 "2014-07-28T19:17:09Z")

</div>

Hi Team,

I am looking for a solution to index delta data for an existing index using  
Nest (.Net). While on searching, I found the below code snippet for upsert..

client.Update(s =\> s  
.Index("myindex")  
.Id(id)  
.Document(objins)  
.Upsert(objins)  
);

My Id field is not int.. it is a string.

My questions are

1. 

in this update statement, do we need to have two different objecttype  
(old and updated) aka (T,K) ? what if the both the objects were same (aka  
\<T,T\> only its property is changed? for e.g, Car is the object . Initially  
the data entered for color = "green", then it got updated as color =  
"forrest green". how do i perform update for this?  
2.

I tried having both as same object. (T, T), rather updating it is insert  
the same document twice rather than updating.  
3.

If i don't mention upsert in the above command.. there is no insert  
happening for the new document from the delta.

All sort of help are appreciated.

Regards  
Madhavan.TR

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f4525944-0375-43c7-b262-d07e858a4da3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f4525944-0375-43c7-b262-d07e858a4da3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:12am UTC](https://discuss.elastic.co/t/issues-during-upsert-for-delta-data-indexing/18933/2 "2017-07-06T01:12:42Z")

</div>

Closed on July 6, 2017, 1:12am UTC


