Diff query between two documents

Hi,
say I have a type that is modeled in the following way:

document {
id: x,
nested_object: [
{objects}, {objects}...
] }

I am looking for a way to execute a diff query between two documents of this type, so that the diff will return all the inner nested objects that exist in one of the documents, but do not exist in the other one..

is it possible ?
if so - do I have a way for controlling the equals function for comparing two nested documents?

Im not sure if you can diff, but the exists API will let you find out missing, null or empty objects in absolute terms. Take a look at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html

thanks for the comment, but this query is not suitable in my case.
I need a more advance diff to find out nested objects that some of their field values are different..

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