How can one store an array of values in a Solr index? I am specifically trying to formulate a schema.xml file.
Consider the following potential Solr document:
ID: 351 Name: Beatles Members: 1) Name: John Instrument: Guitar 2) Name: Paul Instrument: Guitar 3) Name: George Instrument: Bass 4) Name: Ringo Instrument: Drums
In MySQL I would have three tables, like so:
Bands: BandID Name People: PersonID Name Instrument BandsPeople: BandID references Bands(BandID) PersonID references People(PersonID)
Disregarding the concept that a person could belong to multiple bands and other advantages of the MySQL approach, my goal is to learn how to store arrays in Solr. The band is simply an example and possibly not a good one at that!
The obvious approach for having multiple
Members would be a multiValued field:
<field name="member" stored="true" type="string" multiValued="true" indexed="true"/>
However, that multiValued field itself needs to have subvalues. I do not see any documentation on how to formulate the schema. Note that I am using Solr 4. Thanks.