Hi, Your mapping isn't correct. If you remove "properties" around "metrics", it should work.
----- curl -XPUT "http://localhost:9200/testagg/testagg/_mapping" -d' { "testagg": { "properties": { "timeStamp": { "format": "dateOptionalTime", "type": "date" }, "metrics": { "type": "nested", "properties": { "name": { "type": "string" }, "ave": { "type": "double" } } } } } }' ----- Masaru On Wed, Jan 7, 2015 at 7:00 AM, Krishna Raj <[email protected]> wrote: > Hi, > > I am trying to create an index with mapping which contains nested object. > I also tried to update the mapping of an empty created index with the same > below mapping which contains nested object. > > But I am getting MapperParsingException error all time. My cluster goes > down and recoveres automatically. I am banging my head on this for last 1 > week with no help. > > Any help is greatly appreciated. > > Reference: > http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-nested-type.html > > *My Sample JSON: * > > { > "timeStamp": "2014-12-31T19:15:45.000+0000", > "metrics": [ > { > "name": "viewList", > "ave": 10.5 > }, > { > "name": "checkout", > "ave": 20.5 > }, > { > "name": "login", > "ave": 30.5 > }, > { > "name": "logout", > "ave": 40.5 > } > ] > } > > > *Mapping I am trying:* > > curl -XPUT 'http://myhost:9201/testagg/testagg/_mapping' -d '{ > "testagg": { > "properties": { > "timeStamp": { > "format": "dateOptionalTime", > "type": "date" > }, > "properties": { > "metrics": { > "type": "nested", > "properties": { > "name": { > "type": "string" > }, > "ave": { > "type": "double" > } > } > } > } > } > } > }' > > > Thanks, > Krishna Raj > > -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/b6c9049b-8ce0-4478-a954-adf89052b6e0%40googlegroups.com > <https://groups.google.com/d/msgid/elasticsearch/b6c9049b-8ce0-4478-a954-adf89052b6e0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGmu3c0U1%3Dkzewy9LFZBx%2BrCG_4PTYxfK9rxjc947hZXMCMFNA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
