Hi,
I recently upgraded my app to Jackson2. Historically we had been indexing
our rest model objects, since they're pretty well structured and make
querying much easier. In our Jackson2 POJOs we use a className identifier
to mark our objects, like this:
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include =
JsonTypeInfo.As.PROPERTY, property = "className")
@JsonIgnoreProperties(ignoreUnknown=true)
The position in our structure is mapped as an interface, and includes
appropriate
Now that we're indexing them with Jackson2, I've started seeing this
exception whenever a record is stored (but only after a few are
successfully added)
failed to parse [fields.creator.value.value]:
org.elasticsearch.index.mapper.MapperParsingException: failed to parse
[fields.creator.value.value]
at
org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:414)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:549)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:491)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:549)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:491)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:549)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:491)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:549)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:491)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:542)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:491)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:397)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:191)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:535)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:434)
[elasticsearch-1.3.4.jar:]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_20]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_20]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_20]
Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: unknown
property [className]
at
org.elasticsearch.index.mapper.core.StringFieldMapper.parseCreateFieldForString(StringFieldMapper.java:328)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.core.StringFieldMapper.parseCreateField(StringFieldMapper.java:274)
[elasticsearch-1.3.4.jar:]
at
org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:404)
[elasticsearch-1.3.4.jar:]
... 17 more
This is what that section of the JSON looks like:
"fields": [
...,
"creator": {
"className": "BasicField",
"fieldName": "creator",
"fieldType": "person",
"value": {
"className": "PersonType",
"value": {
"className": "PersonId",
"id": 262,
"organizationId": 0
}
}
},
...
]
So, is there anything I can do from mapping to fix this?
John
--
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/4f3546a7-0c0a-447e-91bf-f7843adc751f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.