Tuple configuration example
Tuple columns are added as multiple fields:
ALTER TABLE solr.wiki ADD fieldname tuple<text,int>;
ALTER SEARCH INDEX SCHEMA ON solr.wiki ADD fields.field <fieldname>;
The preceding example adds the following to the schema:
<field indexed="true" multiValued="false" name="fieldname" stored="true" type="TupleField" />
<field indexed="true" multiValued="false" name="fieldname.field1" stored="true" type="TextField" />
<field indexed="true" multiValued="false" name="fieldname.field2" stored="true" type="TrieIntField" />
Adding the leading element fields.
in ADD fields.field <fieldname>
is optional and provides only cosmetic structure.
To drop the TupleField and all the child fields when dropping the base field name:
ALTER SEARCH INDEX SCHEMA ON solr.wiki DROP field fieldname;
To drop individual child fields:
ALTER SEARCH INDEX SCHEMA ON solr.wiki DROP field "fieldname.field1";