Logstash query elasticsearch geohash data -


i aggregating location data using geohash, works on chrome sense plugin, once try query through logstash input plugin of elasticsearch, not working... sense query:

post/_search {  "query": { "match_all": {} }, "aggs": { "my_area": {   "geohash_grid": {      "field":     "location",     "precision": 6   } }   } } 

my logstash configuration file:

input {  elasticsearch { hosts => "localhost:9200" index => "devices" query => '{"query":  {  "aggs": { "my_area": {   "geohash_grid": {      "field":     "location",     "precision": 6         }     } } } }'  }}} 

my logstash exception:

←[31ma plugin had unrecoverable error. restart plugin.   plugin: <logstash::inputs::elasticsearch hosts=>["localhost:9200"],             index=>"de vices", query=>"{\"query\": \n\t{ \n\t\"aggs\": {\n    \"my_area\": {\n      \" geohash_grid\": { \n        \"field\":     \"location\",\n        \"precision\":  6\n\t\t\t}\n\t\t}\n\t} } }", codec=><logstash::codecs::json charset=>"utf-8">, scan=>true, size=>1000, scroll=>"1m", docinfo=>false, docinfo_target=>"@metadata ", docinfo_fields=>["_index", "_type", "_id"], ssl=>false> error: [400] {"error":{"root_cause":[{"type":"query_parsing_exception","reason ":"no query registered     [aggs]","index":"devices","line":3,"col":2}],"type":" search_phase_execution_exception","reason":"all shards failed","phase":"init_sca n","grouped":true,"failed_shards":    [{"shard":0,"index":"devices","node":"fcyfrzla qqeq4q9sktahnw","reason":{"type":"query_parsing_exception","reason":"no query re gistered [aggs]","index":"devices","line":3,"col":2}}]},"status":400}     {:leve l=>:error}←[0m 


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -