Skip to content

Upsert for delta data indexing.. #834

Closed
@madhavtr

Description

@madhavtr

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<OldObjectType, UpdatedObjectType>(s => s
.Index("myindex")
.Id(id)
.Document(objins)
.Upsert(objins)
);

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 only its property is changed? for e.g, Car is the object .. color = "green" for old object.. and it has been updated as color = "forrest green".
  2. I tried having both as same object. (T, T)..the upsert 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions