Version 2.1.1  by WSO2

Category : Siddhi Store
Supported Product Version : SP 4.2.0 SP 4.3.0  

In this release introduces a new annotation called TypeMappings. Please refer example config below:

@Store(type="elasticsearch", @TypeMappings(requestTimestamp="date", latitude="geo_point", longitude="geo_point"), elasticsearch.member.list="http://localhost:9200",username="elastic", password="changeme", bulk.actions="10000", bulk.size="5") define table ESTable (meta_clientType string, requestTimestamp long, latitude double, longitude double);

Here we can specify the list of type mappings.
In this example config, 'requestTimestamp' attribute is mapped to type 'date', 'latitude' attribute is being mapped to type 'geo_point' and so on.

If above annotation is used then need to re-index all the existing data after updating the mapping type. Otherwise we would see the following warning in Kibana when we try to update the index pattern.

"Mapping conflict . A field is defined as several types (string, integer, etc) across the indices that match this pattern. You may still be able to use these conflict fields in parts of Kibana, but they will be unavailable for functions that require Kibana to know their type. Correcting this issue will require reindexing your data."


Social Sites