UDT configuration example

Use CQL commands to manage search indexes.

To create an index on a UDT, you must create the type, create a table that uses the type, and then alter the search index schema.

This example demonstrates how to configure a UDT for DSE Search.

  1. In the search schema, declare the UDTField class:

    <fieldType class="com.datastax.bdp.search.solr.core.types.TupleField"
            name="UDTField"/>
  2. Create the UDT:

    CREATE TYPE Address (street text, city text)
  3. Create a table with a UDT column:

    CREATE TABLE Location ( id text primary key, address frozen<Address> );
  4. Configure the UDTField in the search index schema:

    <field name="address" type="UDTField" indexed="true" stored="true"/>
    <field name="address.street" type="text" indexed="true" stored="true"/>
    <field name="address.city" type="text" indexed="true" stored="true"/>

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2026 | Privacy policy | Terms of use Manage Privacy Choices

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: Contact IBM