phutchins / logstash-input-mongodb

MongoDB input plugin for Logstash
Other
187 stars 104 forks source link

How to handle multi dimensional objects #30

Open yanosh-igor opened 8 years ago

yanosh-igor commented 8 years ago

I have field in mongodb that contains json object. How can I save this document structure into elastic? Example:

in mongodb 
"location" : {
    "lon" : -71.715313,
    "lat" : 42.286992
  }

parse_method => "flatten" returns

 "location": "{"lon"=>-71.715313, "lat"=>42.286992}"

parse_method => "dig" returns

 "location": "{"lon"=>-71.715313, "lat"=>42.286992}"

parse_method => "simple" returns

  "location_lon": "-71.715313",
   "location_lat": "42.286992",

How can I leave same json structure?

"location" : {
    "lon" : -71.715313,
    "lat" : 42.286992
  }
harshit1810 commented 8 years ago

facing same issue...please specify if you are able to resolve

AkashHaldankar commented 7 years ago

Even I am facing the same issue