How to store an array of values ββin the 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, for example:
Bands: BandID Name People: PersonID Name Instrument BandsPeople: BandID references Bands(BandID) PersonID references People(PersonID)
Ignoring the concept that a person can belong to several groups and other advantages of the MySQL approach, my goal is to learn how to store arrays in Solr. The group is just an example and maybe not very good!
An obvious approach for multiple Member would be a field with multiple values:
<field name="member" stored="true" type="string" multiValued="true" indexed="true"/>
However, for this field with multiple values, you must have subselections. I do not see any documentation on how to formulate the scheme. Please note that I am using Solr 4. Thank you.
solr
dotancohen
source share