On Thu, Jun 11, 2015, at 07:20 PM, amid wrote: > Thanks Charles, > > We though of using multi-valued field but got the feeling it will not be > small as our data will grow. > Another issue with multi-valued field is that you can't create complex > join > query, while using a different collection with document with more than > one > field (e.g. recommendation_date) can help us easily delete/limit the > amount > of time this recommendation will not be shown again. > > Thanks for your answer, seems like replication & load balancing will be > good > enough for now :)
Regarding multivalued, I agree with your assessment. Yes, limit the number of returned recommendations by date, that will help avoid a high cardinality and thus poor performance. Effectively what the join does is say, "go find me the ID for all docs which were recommended to user $USER. Now, in my original index, please find all docs for this list of IDs". The more IDs there are, the worse the performance. Upayavira