here is the node js test app
'use strict'
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: "http://localhost:9200",
auth: {
username: use as appropriate
password:
},
})
async function run () {
// Let's search!
let result
try{
result = await client.search({
index: 'logs-generic-default',
"query": {
"bool": {
"must": {
"match_all": { }
},
"filter": {
"geo_bounding_box": {
"navigate_location": { // or "fribble" fribble gets variable not found, navigate returns no hits
"top": 30.6627347,
"bottom": 30.415,
"left": -97.922001,
"right": -97.0185702
}
}
}
}
}
})
} catch(error){
console.log("error="+JSON.stringify(error));
}
finally {
console.log(result)
const data = result.rows.map(row => {
const obj = {}
for (let i = 0; i < row.length; i++) {
obj[result.columns[i].name] = row[i]
}
return obj
})
}
}
run().catch(console.log)