There are multi-valued fields as well. You just have to be creative in the flattening process.

And there is a "join" capability as well:
http://wiki.apache.org/solr/Join

In any case, try to take the simplest approaches first before getting overly complex.

Maybe start by focusing on what you expect that a user query will look like in Solr.

-- Jack Krupansky

-----Original Message----- From: Asfand Qazi
Sent: Thursday, August 30, 2012 10:46 AM
To: solr-user@lucene.apache.org
Subject: Re: Possible to have Solr documents with deeply nested data structures (i.e. 'hashes within hashes')?

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.

Reply via email to