Re: Simple Array Example

2014-09-09 Thread EzCocos
Sorry! but I don't understand. I tried to replace _id by _type and I get 4 documents. Would you be able to give me the related short mapping that would work? For instance for the data: product_id product_info_id '1' 1 '1' 2

Re: Simple Array Example

2014-09-09 Thread vineeth mohan
Hello , In that case you should make product_id as _type rather than _id. Thanks Vineeth On Tue, Sep 9, 2014 at 6:38 PM, EzCocos wrote: > Many thanks Vineeth for your help. > > product_id is indeed unique. If I remove _id I get 4 documents rather than > 2 documents containing each an

Re: Simple Array Example

2014-09-09 Thread EzCocos
Many thanks Vineeth for your help. product_id is indeed unique. If I remove _id I get 4 documents rather than 2 documents containing each an array of related product_info_id. I guess I want _id to be the key under which same product_id got aggregated. In other word if I remove _id, how Elastics

Re: Simple Array Example

2014-09-09 Thread vineeth mohan
Hello , Is product_id unique , seems to me its not. In that case why have you made it as _id. _id should be unique and in face of dedupe , it would be over written. So remove defenition of _id should solve the issue. Thanks Vineeth On Tue, Sep 9, 2014 at 4:09 PM, EzCocos wrote: > De