diff --git a/src/index.mjs b/src/index.mjs index 280a8cf..98b4d56 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -29,6 +29,8 @@ export default async function(indexName, opts = {}) { time_position: new Date(rec[3] * 1000), last_contact: new Date(rec[4] * 1000), location: rec[5] && rec[6] ? `${rec[6]},${rec[5]}` : null, + lat: rec[6], + lon: rec[5], baro_altitude: rec[7], geo_altitude: rec[13], on_ground: rec[8], diff --git a/src/lib/data-source.mjs b/src/lib/data-source.mjs index ebb3005..6df0b1a 100644 --- a/src/lib/data-source.mjs +++ b/src/lib/data-source.mjs @@ -32,6 +32,8 @@ export async function createIndex(client, index) { time_position: { type: 'date' }, last_contact: { type: 'date' }, location: { type: 'geo_point' }, + lat: { type: 'float' }, + lon: { type: 'float' }, baro_altitude: { type: 'float' }, geo_altitude: { type: 'float' }, on_ground: { type: 'boolean' },