Tuple configuration example
Procedure
-
Tuples
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>;
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.
inADD fields.field <fieldname>
is optional and provides only cosmetic structure.Drops 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";