Tuple configuration example


  • 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. in ADD 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";

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com