UDT configuration example

Example steps to configure a UDT for DSE Search.

In the search schema, declare the UDTField class

<fieldType class="com.datastax.bdp.search.solr.core.types.TupleField"
        name="UDTField"/>

Use CQL commands to manage search indexes.

Create a type with the UDT

You must create a type for UDTs.

CREATE TYPE Address (street text, city text)

Create a table with the tuple

CREATE TABLE Location ( id text primary key, address frozen<Address> );

Configure the UDTField in the search 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?

© 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