Hi,

I have the following 3 documents:

{
 "product" : "D1",
 "owner" : "global"
},
{
 "product" : "D1",
 "owner" : "john"
},
{
 "product" : "D2",
 "owner" : "global"
}


There is always a "product" with "owner": "global" and only sometimes the 
same product with different owner (basically a product is customized for a 
user). I would like to return all products but only the customized version 
for a product where it exists (where "owner" = "a-user-name"). So for the 
my example I would like returned the following two docs:

{
 "product" : "D1",
 "owner" : "john"
},
{
 "product" : "D2",
 "owner" : "global"
}


I would appreciate some help on how I could solve this.

Thanks

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/1298ddd6-3cad-4219-89cd-67c5f2642c78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to