Is there Any way to perform mongodb's $addToset like operation in elasticsearch while creating an document to elastic search

(Naval Kishor Kumawat) #1

Like If there is document which is already existing it will add some value to a array field, and if it doesnt exist it will create a new_one?

'name': 'john doe',
'age': 12,
'books': ['x', 'y']

now if a document with this name already exists the query should add books to books field or it should create a new one

(Naval Kishor Kumawat) #2

Hey! I found my answer in official documentation.

(system) #3

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