Configuring tuples and UDTs in the Solr schema

Steps to configure DSE Search to index tuples and UDTs.

DSE Search automatic schema generation from CQL tables supports tuples and UDTs.

Inserting data

Data that is inserted using CQL is automatically recognized by DSE Search and is indexed like any other data. However, data that is inserted by using the HTTP interface requires the tuple/UDT field as a string in its JSON representation. For example:

{"alternativeAddressCollection":"[{\"city\": \"NY\", \"street\": \"sesame1\"}, {\"city\": \"SF\", \"street\": \"sesame2\"}]" , "mainAddress":"{\"street\":\"Sesame\", \"city\":\"Atlanta\"}}

Procedure

If you do not automatically generate the Solr schema, you must follow these steps to manually declare tuples and UDTs in the Solr schema:

  1. Declare the actual tuple or UDT column of this type: com.datastax.bdp.search.solr.core.types.TupleField.
  2. Declare each tuple or UDT field with its own type.
    The field name must be composed by the corresponding tuple or UDT name, plus the actual field index for tuples, or name for UDTs, concatenated by dots.