Search code examples
indexinggeomesa

Using Date or Long type in geomesa accumulo for storing timestamp value


I am using geomesa for indexing over acccumulo storage. I have an attribute which stores timestamp values. I am confused between which TYPE and INDEX to use for storing timestamp values depending upon index performance.

There are two cases

  1. Using Long as timestamp type and create attribute index.
  2. Using Date type and use default date index.

I want to know which technique is better out of this two in terms of searching and sorting in millions of records.


Solution

  • Geomesa indexing is optimized for the second case, Date type with default date. The Z3 and XZ3 indices are designed to combine the default date and default geometry into a composite index for fast geospatial queries.

    Examples:

    GDELT feature type configuration

    T-Drive feature type configuration

    Twitter feature type configuration

    One note, you can have multiple Date attributes and the default key in the feature type serves to say which attribute to put in the indices.