Search index schema field types
DataStax Enterprise Search index schemas define the CQL to Solr type mapping.
A field type definition is required to parse data from a CQL column into the corresponding Solr field in the index.
The fieldType
definitions support processing instructions in the analyzer section.
Restriction: Decimal and varint are indexed as strings. Apache Lucene® does not support the precision required by these numeric types. Range and sorting queries do not work as expected if a table uses the decimal and varint types; equality searches work as expected.
CQL data type compatibility with Solr field type classes
DSE Search index schema defines the Solr field type of each indexed CQL column. The default mapping provides support for the most common use cases. To perform more advanced searches or a different type of analysis on a column, use the following compatibility matrix to determine the supported CQL to Solr type mappings.
CQL data type | Solr field type | Supports docValues | Description |
---|---|---|---|
AsciiStrField |
false |
Indexed as a standard Solr StrField. |
|
TrieLongField |
true |
Long field for Lucene TrieRange processing. |
|
BinaryField |
not supported |
Binary data. |
|
BoolField |
false |
True (1, t, or T) or False (not 1, t, or T) |
|
not indexable |
N/A |
64-bit signed integer. |
|
SimpleDateField (DataStax custom field) |
not supported |
TrieDateField holding a CQL date. |
|
DateRangeField |
not supported |
Point-in-time with millisecond precision with support for date ranges. See Using date ranges in solr_query. |
|
DecimalStrField |
false |
Indexed as a standard Solr StrField. |
|
TrieDoubleField |
true |
Double field for Lucene TrieRange processing. |
|
not indexable |
N/A |
Reserved data type for Spark. |
|
not indexable |
N/A |
Range of time, such as 12h30m. |
|
text, varchar |
EnumField |
not supposed |
A closed set with a pre-determined sort order. |
text, varchar |
ExternalFileField |
not supported |
Values from disk file. |
TrieFloatField |
true |
Floating point field for Lucene TrieRange processing. |
|
text, varchar |
GeoHashField |
not supported |
Hash of coordinate pair (latitude,longitude) stored as a string. |
InetField |
false |
InetField is implemented and indexed as a standard Solr StrField. |
|
TrieIntField |
true |
32-bit signed integer field for Lucene TrieRange processing. |
|
text, varchar |
LatLonType |
not supported |
Latitude/Longitude 2-D point, latitude first. |
text, varchar |
LowerCaseStrField |
true |
Recommended method for case-insensitive text search, faceting, grouping, and sorting. Sets field values as lowercase and stores them as lowercase in docValues. See Using LowerCaseStrField with search indexes. |
SpatialRecursivePrefixTreeFieldType |
true |
Spatial field type for a point geospatial context. |
|
SpatialRecursivePrefixTreeFieldType |
true |
Spatial field type for a point geospatial context. |
|
text, varchar |
PointType |
Coordinate values, two per point for spatial search. |
|
SpatialRecursivePrefixTreeFieldType |
true |
Spatial field type for a point geospatial context. |
|
text, varchar |
RandomSortField |
not supported |
Dynamic field in random order. |
text, varchar |
SpatialRecursivePrefixTreeFieldType |
Spatial field type for a geospatial context. |
|
TrieIntField |
true |
32-bit signed integer field for Lucene TrieRange processing. |
|
text, varchar |
StrField |
false |
String (UTF-8 encoded string or Unicode). |
TextField |
false |
Text, usually multiple words or tokens. |
|
TimeField |
true |
A TrieLongField holding a CQL time. |
|
TrieDateField |
true |
Date field for Lucene TrieRange processing; supports indexing negative dates. |
|
TimeUUIDField |
true |
Type 1 Universally Unique Identifier (UUID). |
|
N/A |
TrieField |
true |
Same as any Trie field type. |
TrieIntField |
true |
32-bit signed integer field for Lucene TrieRange processing. |
|
TupleField |
false |
Fixed length set of elements of different types. |
|
TupleField |
false |
User-defined type. |
|
UUIDField |
true |
Universally Unique Identifier (UUID). |
|
TextField |
not supported |
Text, usually multiple words or tokens. |
|
VarIntStrField |
false |
Indexed as a standard Solr StrField. |