feat: index location as raw numbers
This commit is contained in:
@@ -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],
|
||||
|
||||
@@ -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' },
|
||||
|
||||
Reference in New Issue
Block a user