The problem with the parent/child thing is that each child can only have a single parent. So if you index what -- in your model -- is the same product as a child of multiple vendors, and then you want to search for multiple vendors at once, you are going to get multiple copies of the child product, one for each vendor that has it. I think probably if you were always searching for a single vendor at a time, this could work though.
Indexing all the vendor ids in each product document probably won't add any indexing overhead relative to the parent/child model you proposed -- in both cases you have to reindex the products when a vendor picks them up or drops them, although in the parent/child case ES does this for you internally. Re: the huge documents; yes that could be a problem. Although having lots of terms in the index is not really an issue, the fact that ES stores your entire document and gives it back to you by default will chew up storage and bandwidth, as you say. To avoid this, you could disable the _source field: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-source-field.html -Mike PS I got your first reply - it just didn't go to the list On Friday, February 14, 2014 11:34:11 PM UTC-5, Ben Hirsch wrote: > > argh I just wrote a reply but google ate it apparently. > > So, are you suggesting that scrapping parent/child and simply storing all > of the retailer data in the product document is a safer bet. I imagine we > could rate limit our product indexing. However this now gives me two > concerns: 1 - the size of the product document. We would have product > documents with 20,000+ UPC entries as nested objects! and 2 - would our > search results also return those 20,000 nested objects? > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/dd7982c0-864b-4c5d-b0a9-7ea5c2d217bc%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
