Added details view, nested fields, clickable query building to table panel

This commit is contained in:
Rashid Khan
2013-02-18 21:41:56 -07:00
parent a8570135ee
commit 38c92ac482
7 changed files with 78 additions and 13 deletions

View File

@@ -13,8 +13,12 @@ curl -XPUT http://localhost:9200/_template/shakespeare -d '
"play_name" : {"type": "string", "index" : "not_analyzed" },
"line_id" : { "type" : "integer", "index": "not_analyzed" },
"speech_number" : { "type" : "integer", "index": "not_analyzed" },
"state" : {"type": "string", "index" : "not_analyzed" },
"country" : {"type": "string", "index" : "not_analyzed" }
"geo" : {
"properties": {
"state" : {"type": "string", "index" : "not_analyzed" },
"country" : {"type": "string", "index" : "not_analyzed" }
}
}
}
}
}

View File

@@ -24,10 +24,12 @@ fs.readFile('shakespeare.json', 'utf8', function (err,data) {
var randomnumber=Math.floor(Math.random()*57600000)
var command = {index:{_index: "shakespeare", _type: "line", _id: i}};
o['@timestamp'] = new Date((new Date()).getTime() -9000000 + randomnumber);
o.geo = [getRandomInRange(-90, 90, 3),getRandomInRange(-180, 180, 3)]
o.country = get_country();
if(o.country == 'US')
o.state = get_state()
o.geo = {
geojson : [getRandomInRange(-90, 90, 3),getRandomInRange(-180, 180, 3)],
country : get_country()
}
if(o.geo.country == 'US')
o.geo.state = get_state();
console.log(JSON.stringify(command))
console.log(JSON.stringify(o));
var percent = Math.floor((i/lines)*100)