I think you are misunderstanding "denormalize" in this context. It still may not be what you want to do for other reasons, but the usual idea is to replicate the parent info in each of the children, so you'd have something like:
doc1 = title:"iPad 64gb" description: "iPad 64gb with retina" merchantid:343 locationid: 1345 cost: USD|600 doc2 = title:"iPad 64gb" description: "iPad 64gb with retina" merchantid:343 locationid: 4353 cost: USD|600 And so on. Best, Erick On Wed, Apr 30, 2014 at 12:24 PM, Utkarsh Sengar <utkarsh2...@gmail.com> wrote: > I have to modify a schema where I can attach nested "pricing per store" > information for a product. For example: > > 10010137332:{ > title:"iPad 64gb" > description: "iPad 64gb with retina" > pricing:{ > merchantid64354:{ > locationid643:{ > "USD|600" > } > locationid6436:{ > "USD|600" > } > } > merchantid343:{ > locationid1345:{ > "USD|600" > } > locationid4353:{ > "USD|600" > } > } > } > } > > > This is what is suggested all over the internet: > Denormalize it: In my case, I will end up with total number of columns = > total locations with a price which is about 100k. I don't think having 100k > columns for 60M products is a good idea. > > Are there any better ways of handling this? > I am trying to figure out multivalue field but as far as I understand it, > it can only be used as a "flag" but cannot be used to get a value > associated to a key. > > Based on this answer, solr 4.5+ supports nested documents: > http://stackoverflow.com/a/5585891/231917 but I am currently on 4.4. > > > > -- > Thanks, > -Utkarsh