You can always flatten. Remember, you are using SOLR to find the records. So, just make sure you flatten so each result represents one unit of information for your purposes.
So, you push all leg_measurements into one big leg_measurement multiValue field (and return all ?? that have at least one leg_measurement equal to 15. Or you pull parent details into individual record with a record being a measurement and include enough information to ID the parent record, which you then sort/uniq on client. If you have a deep structure, you will probably use SOLR just to index (stored=false for fields) and use record ID to get the full record detail from the original database. Don't treat SOLR as your primary database with complex structure, it is not built for that. Regards, Alex. Personal blog: http://blog.outerthoughts.com/ LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch - Time is the quality of nature that keeps events from happening all at once. Lately, it doesn't seem to be working. (Anonymous - via GTD book) On Thu, Aug 30, 2012 at 10:46 AM, Asfand Qazi <a...@sanger.ac.uk> wrote: > On 30/08/12 15:19, Jack Krupansky wrote: >> >> The general rule is that you need to flatten your data. So, you would >> have "chest_measurement" and "leg_measurement" fields. >> >> -- Jack Krupansky > > > Ah. What if I cannot flatten it because I have an array of hashes? > > Thanks > > Asfand Yar Qazi > > >> >> -----Original Message----- From: Asfand Qazi >> Sent: Thursday, August 30, 2012 6:03 AM >> To: solr-user@lucene.apache.org >> Subject: Possible to have Solr documents with deeply nested data >> structures (i.e. 'hashes within hashes')? >> >> Hi, >> >> Is it possible to have a Solr documents with deeply nested data >> structures? >> >> e.g. (in JSON) >> >> { >> "name": "Fred", >> "measurements": { >> "chest": "15", >> "legs": "32", >> ... >> } >> } >> >> ? >> >> Thanks >> > > > -- > Regards, > Asfand Yar Qazi > Team 87 - High Throughput Gene Targeting > Wellcome Trust Sanger Institute > > > > -- > The Wellcome Trust Sanger Institute is operated by Genome Research Limited, > a charity registered in England with number 1021457 and a company registered > in England with number 2742969, whose registered office is 215 Euston Road, > London, NW1 2BE.