Mapping of Solr types 

Reference information of DataStax Enterprise mapping of Solr types to CQL types and Cassandra validators.

This table shows the DataStax Enterprise mapping of Solr types to CQL types and Cassandra validators.

Solr Type CQL type Cassandra Validator Description
AsciiStrField ascii AsciiType Indexed as a standard Solr StrField
BCDIntField int Int32Type Binary-coded decimal (BCD) integer
BCDLongField bigint LongType BCD long integer
BCDStrField text, varchar UTF8Type BCD string
BinaryField blob BytesType Binary data
BoolField boolean BooleanType True (1, t, or T) or False (not 1, t, or T)
ByteField int Int32Type Contains an 8-bit number value
DateField timestamp DateType Point in time with millisecond precision
DecimalStrField decimal DecimalType Indexed as a standard Solr StrField
DoubleField double DoubleType Double (64-bit IEEE floating point)
EnumField text, varchar UTF8Type A closed set having a pre-determined sort order
ExternalFileField text, varchar UTF8Type Values from disk file
FloatField float FloatType 32-bit IEEE floating point
GeoHashField text, varchar UTF8Type Geohash lat/lon pair represented as a string
InetField inet InetAddressType InetField is currently implemented and indexed as a standard Solr StrField.
IntField int Int32Type 32-bit signed integer
LatLonType text, varchar UTF8Type Latitude/Longitude 2-D point, latitude first
LongField bigint LongType Long integer (64-bit signed integer)
PointType text, varchar UTF8Type Arbitrary n-dimensional point for spatial search
RandomSortField text, varchar UTF8Type Dynamic field in random order
ShortField int Int32Type Short integer
SortableDoubleField double DoubleType Numerically sorted doubles
SortableFloatField float FloatType Numerically sorted floating point
SortableIntField int Int32Type Numerically sorted integer
SortableLongField bigint LongType Numerically sorted long integer
SpatialRecursivePrefixTreeFieldType text, varchar UTF8Type Spatial field type for a geospatial context
StrField text, varchar UTF8Type String (UTF-8 encoded string or Unicode)
TextField text, varchar UTF8Type Text, usually multiple words or tokens
TrieDateField timestamp DateType Date field for Lucene TrieRange processing
TrieDoubleField double DoubleType Double field for Lucene TrieRange processing
TrieField n/a n/a Same as any Trie field type
TrieFloatField float FloatType Floating point field for Lucene TrieRange processing
TrieIntField int Int32Type Int field for Lucene TrieRange processing
TrieLongField bigint LongType Long field for Lucene TrieRange processing
UUIDField uuid, timeuuid UUIDType Universally Unique Identifier (UUID)
VarIntStrField varint IntegerType Indexed as a standard Solr StrField
Other text, varchar UTF8Type Indexed as a standard Solr StrField
For efficiency in operations such as range queries, using Trie types is recommended. Keep the following information in mind about these types:
  • UUIDField

    DataStax Enterprise supports the Cassandra TimeUUID type. A value of this type is a Type 1 UUID that includes the time of its generation. Values are sorted, conflict-free timestamps. For example, use this 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 Cassandra TimeUUID to a Solr UUIDField, users need to search for the whole UUID value, not just its time component.

  • BCD

    A relatively inefficient encoding that offers the benefits of quick decimal calculations and quick conversion to a string.

  • SortableDoubleField/DoubleType

    If you use the plain types (DoubleField, IntField, and so on) sorting will be lexicographical instead of numeric.

  • TrieField

    Used with a type attribute and value: integer, long, float, double, date.

Mapping of CQL collections

DSE Search maps collections as follows:

The name of the dynamic field minus the wildcard is the map name. For example, a map column name dyna* is mapped to dyna. Inner keys are mapped to the full field name.