Hi Simon,
You can index attributes for quick querying. To do this, when you
create your simple feature type you need to indicate that you want
it to be indexed like so: name:String:index=full. (In addition to
'full', you can specify index=join, which will save some disk space
at the cost of query performance).
In addition, make sure that you use our custom simple feature type
parser: in scala it is
org.locationtech.geomesa.utils.geotools.SimpleFeatureTypes, or we
have a java version at
org.locationtech.geomesa.utils.interop.SimpleFeatureTypes.
Please note that attribute indices are designed for attributes that
have a high cardinality - indexing e.g. a boolean will give you very
poor performance. Also, they use a single threaded scan, so if you
are trying to return a lot of records at once they will not be
particularly fast. There are some other caveats with how a given
query will be executed - if you have a more specific use case I can
probably give some guidance there.
If you want to add indices to an existing data set, we have a
map/reduce job that you can run, details of which are here:
https://github.com/locationtech/geomesa/tree/master/geomesa-jobs#attribute-indexing
Thanks,
On 06/15/2015 08:21 AM, Xu (Simon) Chen
wrote:
Hello,
I am curious to know if there is a way to inform geomesa to
index on a column in addition to location and time. For
example a string column like name and point type.
Thanks!
-Simon
_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
http://www.locationtech.org/mailman/listinfo/geomesa-users
|