error: elasticsearch java : org.elasticsearch.ElasticsearchIllegalArgumentException: unknown property [content]


(ALI BEN ABDALLAH) #1

hello, i need help please.
i'm trying to index an xml document after convert it to json but i have
this error.
do you have any idea please?
Thanks in advance.


0 [main] INFO org.elasticsearch.plugins - [Base] loaded [], sites []
Exception in thread "main"
org.elasticsearch.index.mapper.MapperParsingException: failed to parse
[documents.document.body.lead.p.TC]
at
org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:418)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:517)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeArray(ObjectMapper.java:594)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:461)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:549)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:459)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:555)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:459)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:517)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:459)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:517)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:459)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:517)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:459)
at
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:515)
at
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:462)
at
org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:384)
at
org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:203)
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:556)
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:426)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: unknown
property [content]
at
org.elasticsearch.index.mapper.core.LongFieldMapper.innerParseCreateField(LongFieldMapper.java:287)
at
org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:215)
at
org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:408)
... 22 more

this's my json document:


{"documents":{"document":{"body":{"title":"Non
Stop","duration":"0:30:0","timezone":"+0200","air.time":"11:30 (UTC
+0200)","epochtime":1410946200,"timecode.unit":"sec","chan_id":"tv","lead":{"p":{"UTC":20140917093000,"offset":0,"TC":[20140917113000,{"content":"ministres","utcstarttime":20140917093001,"tcendtime":20140917113001,"offset":1,"tcstarttime":20140917113001,"utcendtime":20140917093001}]}},"air.startTime":20140917113000,"media":{"media-reference":{"content":"non-stop.mp4","nodoc":"VIDEO·20140917·TZB_V·20140917113000","format":"tv"},"media-type":"video"}},"doc.management":{"nodoc":{"pub.code":"TZB","date":20140917,"type":"TV"},"status":"DIFFUSE","initial.sequence":"20140917113000non-stop","language":"FRA"},"signaletic":{"publication":{"category":"Journal","name.norm":"TV","date.iso8601":"2014-09-17"}}},"schemaLocation":"http://google.com/"}}

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3e41a927-6982-400d-9c99-ab44c464bea1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(David Pilato) #2

Did you set any mapping, any setting?

Actually, it would be better to give a full recreation so we can see immediately what is happening.

Have a look at http://www.elasticsearch.org/help/

--
David Pilato | Technical Advocate | elasticsearch.com
david.pilato@elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 20 octobre 2014 à 15:32:50, ALI BEN ABDALLAH (ali.benabda1@gmail.com) a écrit:

hello, i need help please.
i'm trying to index an xml document after convert it to json but i have this error.
do you have any idea please?
Thanks in advance.


0 [main] INFO org.elasticsearch.plugins - [Base] loaded [], sites []
Exception in thread "main" org.elasticsearch.index.mapper.MapperParsingException: failed to parse [documents.document.body.lead.p.TC]
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:418)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:517)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeArray(ObjectMapper.java:594)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:461)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:549)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:459)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:555)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:459)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:517)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:459)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:517)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:459)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:517)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:459)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:515)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:462)
at org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:384)
at org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:203)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:556)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:426)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: unknown property [content]
at org.elasticsearch.index.mapper.core.LongFieldMapper.innerParseCreateField(LongFieldMapper.java:287)
at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:215)
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:408)
... 22 more

this's my json document:


{"documents":{"document":{"body":{"title":"Non Stop","duration":"0:30:0","timezone":"+0200","air.time":"11:30 (UTC +0200)","epochtime":1410946200,"timecode.unit":"sec","chan_id":"tv","lead":{"p":{"UTC":20140917093000,"offset":0,"TC":[20140917113000,{"content":"ministres","utcstarttime":20140917093001,"tcendtime":20140917113001,"offset":1,"tcstarttime":20140917113001,"utcendtime":20140917093001}]}},"air.startTime":20140917113000,"media":{"media-reference":{"content":"non-stop.mp4","nodoc":"VIDEO·20140917·TZB_V·20140917113000","format":"tv"},"media-type":"video"}},"doc.management":{"nodoc":{"pub.code":"TZB","date":20140917,"type":"TV"},"status":"DIFFUSE","initial.sequence":"20140917113000non-stop","language":"FRA"},"signaletic":{"publication":{"category":"Journal","name.norm":"TV","date.iso8601":"2014-09-17"}}},"schemaLocation":"http://google.com/"}}

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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3e41a927-6982-400d-9c99-ab44c464bea1%40googlegroups.com.
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.544518de.6b8b4567.3f7%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.


(system) #3