How about using parent/child functionality? https://gist.github.com/mattweber/96f3515fc4453a5cb0db
Thanks, Matt Weber On Wed, Feb 26, 2014 at 7:45 PM, Jayesh Bhoyar <jsbonline2...@gmail.com>wrote: > Hi Binh, > > Thanks for the answer. > > Is there any case if I index this data into same index with different > category GIST@ https://gist.github.com/jsbonline2006/9243973 > I have 1 index: > > productindex/ Type: offertype > productindex/ Type: categorytype > > > Now as per my index data: > My input will be category "Flat TV" > And in output: I want all skuid for "Flat TV" and there corresponding > offer_id. > > Regards, > Jayesh Bhoyar > > *GIST @https://gist.github.com/jsbonline2006/9243973 > <https://gist.github.com/jsbonline2006/9243973>* > > > On Wednesday, February 26, 2014 8:07:01 PM UTC+5:30, Binh Ly wrote: >> >> Unfortunately, ES is not like SQL in this respect. You'll need to >> denormalize somewhat because ES is more "document-oriented". You'd probably >> need to either denormalize offer_id into categorytype, or category into >> offertype to get all the data you want returned in 1 query. >> > -- > 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/bdd1dd5e-be45-4faa-a01f-f6e491249d65%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- 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/CAJ3KEoCF1hPXeapnrXyPpv3h%3DSetwCPN2MUSV%3DYtNiwW286HWA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.