Mapping of Solr types

Table of Solr types.

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

Solr Type Cassandra Validator Description
BCDIntField Int32Type Binary-coded decimal (BCD) integer
BCDLongField LongType BCD long integer
BCDStrField UTF8Type BCD string
BinaryField BytesType Binary data
BoolField BooleanType True (1, t, or T) or False (not 1, t, or T)
ByteField Int32Type Contains an 8-bit number value
DateField DateType Point in time with millisecond precision
DoubleField DoubleType Double (64-bit IEEE floating point)
EnumType Int32Type A closed set having a pre-determined sort order
ExternalFileField UTF8Type Values from disk file
FloatField FloatType 32-bit IEEE floating point
IntField Int32Type 32-bit signed integer
LongField LongType Long integer (64-bit signed integer)
RandomSortField UTF8Type Dynamic field in random order
ShortField Int32Type Short integer
SortableDoubleField DoubleType Numerically sorted doubles
SortableFloatField FloatType Numerically sorted floating point
SortableIntField Int32Type Numerically sorted integer
SortableLongField LongType Numerically sorted long integer
StrField UTF8Type String (UTF-8 encoded string or Unicode)
TextField UTF8Type Text, usually multiple words or tokens
TrieDateField DateType Date field for Lucene TrieRange processing
TrieDoubleField DoubleType Double field for Lucene TrieRange processing
TrieField see description Same as any Trie field type
TrieFloatField FloatType Floating point field for Lucene TrieRange processing
TrieIntField Int32Type Int field for Lucene TrieRange processing
TrieLongField LongType Long field for Lucene TrieRange processing
UUIDField UUIDType Universally Unique Identifier (UUID)
LatLonType UTF8Type Latitude/Longitude 2-D point, latitude first
PointType UTF8Type Arbitrary n-dimensional point for spatial search
GeoHashField UTF8Type Geohash lat/lon pair represented as a string
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 4.0.2 and later 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.

  • 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:
  • Collection list and set: multi-valued field
  • Collection maps: dynamic field

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.