Update index on updating document in Couchdb


(Kartavya) #1

Hi

I have quite different requirement while updating a record in couchdb and
Elastic Search Index.

Check the scenario below:

Current document in couchdb and index is as follows

fields: A | B | C
Values: null | v | v

Now I updated the document in couchdb as follows

fields: A | B | C
Values: v | v | null

Document in index also get updated as
fields: A | B | C
Values: v | v | null

*But *
I want document like
fields: A | B | C
Values: v | v | v

means *union *of existing and updated document.

How it is possible?

Any help would be highly appreciated.

Best Regards,
Pulkit Agrawal


(Shay Banon) #2

Sounds like you will need to manage it on your end then. Make sure when you update a doc in couch, you index the union of it.

On Thursday, June 2, 2011 at 12:30 AM, pulkit aggarwal wrote:

Hi

I have quite different requirement while updating a record in couchdb and Elastic Search Index.

Check the scenario below:

Current document in couchdb and index is as follows

fields: A | B | C
Values: null | v | v

Now I updated the document in couchdb as follows

fields: A | B | C
Values: v | v | null

Document in index also get updated as
fields: A | B | C
Values: v | v | null

But
I want document like
fields: A | B | C
Values: v | v | v

means union of existing and updated document.

How it is possible?

Any help would be highly appreciated.

Best Regards,
Pulkit Agrawal


(Kartavya) #3

OK,

So I have to take care in my code itself.

Thanks a lot.

Regards,
Pulkit Agrawal
On Thu, Jun 2, 2011 at 1:04 PM, Shay Banon shay.banon@elasticsearch.comwrote:

Sounds like you will need to manage it on your end then. Make sure when
you update a doc in couch, you index the union of it.

On Thursday, June 2, 2011 at 12:30 AM, pulkit aggarwal wrote:

Hi

I have quite different requirement while updating a record in couchdb and
Elastic Search Index.

Check the scenario below:

Current document in couchdb and index is as follows

fields: A | B | C
Values: null | v | v

Now I updated the document in couchdb as follows

fields: A | B | C
Values: v | v | null

Document in index also get updated as
fields: A | B | C
Values: v | v | null

*But *
I want document like
fields: A | B | C
Values: v | v | v

means *union *of existing and updated document.

How it is possible?

Any help would be highly appreciated.

Best Regards,
Pulkit Agrawal


(system) #4