I cannot map a geopoint with elassandra and the cassandra-express driver.
geopoint UDT:
manageESIndex: true,
udts: {
geopoint: {
lat: 'double',
lon: 'double'
}
}
cassandra table elastic mapping:
location: {
type: 'frozen',
typeDef: '<geopoint>'
}
...
es_index_mapping: {
discover: '.*',
properties: {
"location": {
"type": "geo_point"
}
}
}
The resulting elastic mapping is:
"location": {
"type": "nested",
"cql_collection": "singleton",
"cql_udt_name": "geopoint",
"properties": {
"lat": {
"type": "double",
"cql_collection": "singleton"
},
"lon": {
"type": "double",
"cql_collection": "singleton"
}
}
}
As can be seen, the mapping does not produce a geo_point, but a lat / lon pair. This does not work when trying to do a distance search. It seems that when using 'discover' the mapping properties are ignored.