Search index field type classes

Definitions for DSE Search index schema field types.

Indexing data from a CQL column using DataStax Enterprise Search, parses the CQL data into a corresponding Solr field. The index schema for each table must contain the Solr field type definition along with optional advanced processing instructions.

Tip: See compatitbility matrix for CQL to Solr type mappings.

Trie field types

TrieDoubleField
ALTER SEARCH INDEX SCHEMA ON table_name 
ADD types.fieldType[@class=org.apache.solr.schema.TrieDoubleField', @name='TrieDoubleField'];

Results in the following schema XML:

<fieldType class="org.apache.solr.schema.TrieDoubleField" name="TrieDoubleField"/>
TrieDateField
Date field for Lucene TrieRange processing, supports indexing negative date. For example: -28011-12-02T00:00:00.002Z. To insert negative dates for the CQL timestamp, insert an epoch time in milliseconds. The TimestampType does not accept a textual representation of negative dates.
ALTER SEARCH INDEX SCHEMA ON table_name 
ADD types.fieldType[@class='org.apache.solr.schema.TrieDateField', @name='TrieDateField'];

Results in the following schema XML:

<fieldType class="org.apache.solr.schema.TrieDateField" name="TrieDateField"/>
TrieFloatField
ALTER SEARCH INDEX SCHEMA ON table_name 
ADD types.fieldType[@class='org.apache.solr.schema.TrieFloatField', @name='TrieFloatField'];

Results in the following schema XML:

<fieldType class="org.apache.solr.schema.TrieFloatField" name="TrieFloatField"/>
TrieIntField
ALTER SEARCH INDEX SCHEMA ON table_name 
ADD types.fieldType[@class='org.apache.solr.schema.TrieIntField', @name='TrieIntField'];

Results in the following schema XML:

<fieldType class="org.apache.solr.schema.TrieFloatField" name="TrieFloatField"/>

String field types

VarIntStrField
Define with the DataStax class to convert a CQL varint.
ALTER SEARCH INDEX SCHEMA ON table_name 
ADD types.fieldType[@class='com.datastax.bdp.search.solr.core.types.VarIntStrField', @name='VarIntStrField'];

Results in the following schema XML:

<fieldType class="com.datastax.bdp.search.solr.core.types.VarIntStrField" name="VarIntStrField"/>
AsciiStrField
Converts a CQL ascii into a standard Solr StrField.
ALTER SEARCH INDEX SCHEMA ON table_name 
ADD types.fieldType[@class='com.datastax.bdp.search.solr.core.types.AsciiStrField', @name='AsciiStrField'];

Results in the following Schema XML:

<fieldType class="com.datastax.bdp.search.solr.core.types.AsciiStrField"
       name="AsciiStrField"/>
SimpleDateField
Define with the DataStax class to convert a CQL date field into a compatible Solr date field.
ALTER SEARCH INDEX SCHEMA ON table_name 
ADD types.fieldType[@class='com.datastax.bdp.search.solr.core.types.SimpleDateField', @name='SimpleDateField'];

Results in the following Schema XML:

<fieldType class="com.datastax.bdp.search.solr.core.types.SimpleDateField" name="SimpleDateField"/>
BoolField
Due to SOLR-7264, setting docValues to true on a boolean field in the Solr schema does not work. A workaround for boolean docValues is to use 0 and 1 with a TrieIntField.
ALTER SEARCH INDEX SCHEMA ON table_name 
ADD types.fieldType[@class='org.apache.solr.schema.BoolField', @name='BoolField'];

Results in the following Schema XML:

<fieldType class="org.apache.solr.schema.BoolField" name="BoolField"/>
BinaryField
ALTER SEARCH INDEX SCHEMA ON table_name 
ADD types.fieldType[@class='org.apache.solr.schema.BinaryField', @name='BinaryField'];

Results in the following Schema XML:

<fieldType class="org.apache.solr.schema.BinaryField" name="BinaryField"/>
UUIDField
UUIDFIeld is a type 1 UUID data type, which includes the time of its generation. Values are sorted by conflict-free timestamps. For example, use the TimeUUID type to identify a column, such as a blog entry, by its timestamp and allow multiple clients to write to the same partition key simultaneously. To find data mapped from a TimeUUID to a UUIDField, search for the entire UUID value, not just its time component.
ALTER SEARCH INDEX SCHEMA ON table_name 
ADD types.fieldType[@class='org.apache.solr.schema.UUIDField', @name='UUIDField'];

Results in the following Schema XML:

<fieldType class="org.apache.solr.schema.UUIDField" name="UUIDField"/>
TextField
ALTER SEARCH INDEX SCHEMA ON table_name 
ADD types.fieldType[@class='org.apache.solr.schema.TextField', @name='TextField'];