我正在创建一个ElasticSearch River,它从像Alfresco这样的CMIS兼容存储库中提取元数据。我有一个包含冒号的字符串,看起来ES正在尝试将字符串转换为数字。任何人都可以使用对象映射器来处理这个JSON字符串吗?
例外:
org.elasticsearch.index.mapper.MapperParsingException: failed to parse [propertyData.values]
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:418)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:636)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeArray(ObjectMapper.java:624)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:481)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:537)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeArray(ObjectMapper.java:614)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:481)
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:394)
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:413)
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:155)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:534)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:433)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NumberFormatException: For input string: "cmis:document"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:441)
at java.lang.Long.parseLong(Long.java:483)
at org.elasticsearch.common.xcontent.support.AbstractXContentParser.longValue(AbstractXContentParser.java:145)
at org.elasticsearch.index.mapper.core.LongFieldMapper.innerParseCreateField(LongFieldMapper.java:297)
at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:224)
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:408)
... 16 more
JSON:
{
"objectId": "workspace://SpacesStore/cc8c446f-ac4e-40e5-b040-08f1030b708e",
"propertyData": [
{
"displayName": "Content Stream Length",
"extensions": null,
"firstValue": 39914,
"id": "cmis:contentStreamLength",
"localName": "contentStreamLength",
"queryName": "cmis:contentStreamLength",
"values": [
39914
]
},
{
"displayName": "Object Type Id",
"extensions": null,
"firstValue": "cmis:document",
"id": "cmis:objectTypeId",
"localName": "objectTypeId",
"queryName": "cmis:objectTypeId",
"values": [
"cmis:document"
]
},
{
"displayName": "Version Series Checked Out By",
"extensions": null,
"firstValue": null,
"id": "cmis:versionSeriesCheckedOutBy",
"localName": "versionSeriesCheckedOutBy",
"queryName": "cmis:versionSeriesCheckedOutBy",
"values": []
},
{
"displayName": "Version Series Checked Out Id",
"extensions": null,
"firstValue": null,
"id": "cmis:versionSeriesCheckedOutId",
"localName": "versionSeriesCheckedOutId",
"queryName": "cmis:versionSeriesCheckedOutId",
"values": []
},
{
"displayName": "Is private working copy",
"extensions": null,
"firstValue": null,
"id": "cmis:isPrivateWorkingCopy",
"localName": "isPrivateWorkingCopy",
"queryName": "cmis:isPrivateWorkingCopy",
"values": []
},
{
"displayName": "Version series id",
"extensions": null,
"firstValue": "cc8c446f-ac4e-40e5-b040-08f1030b708e",
"id": "cmis:versionSeriesId",
"localName": "versionSeriesId",
"queryName": "cmis:versionSeriesId",
"values": [
"cc8c446f-ac4e-40e5-b040-08f1030b708e"
]
},
{
"displayName": "Version Label",
"extensions": null,
"firstValue": "1.0",
"id": "cmis:versionLabel",
"localName": "versionLabel",
"queryName": "cmis:versionLabel",
"values": [
"1.0"
]
},
{
"displayName": "Is Latest Version",
"extensions": null,
"firstValue": true,
"id": "cmis:isLatestVersion",
"localName": "isLatestVersion",
"queryName": "cmis:isLatestVersion",
"values": [
true
]
},
{
"displayName": "Is Version Series Checked Out",
"extensions": null,
"firstValue": false,
"id": "cmis:isVersionSeriesCheckedOut",
"localName": "isVersionSeriesCheckedOut",
"queryName": "cmis:isVersionSeriesCheckedOut",
"values": [
false
]
},
{
"displayName": "Last Modified By",
"extensions": null,
"firstValue": "admin",
"id": "cmis:lastModifiedBy",
"localName": "lastModifiedBy",
"queryName": "cmis:lastModifiedBy",
"values": [
"admin"
]
},
{
"displayName": "Created by",
"extensions": null,
"firstValue": "admin",
"id": "cmis:createdBy",
"localName": "createdBy",
"queryName": "cmis:createdBy",
"values": [
"admin"
]
},
{
"displayName": "Alfresco Node Ref",
"extensions": null,
"firstValue": "workspace://SpacesStore/cc8c446f-ac4e-40e5-b040-08f1030b708e",
"id": "alfcmis:nodeRef",
"localName": "nodeRef",
"queryName": "alfcmis:nodeRef",
"values": [
"workspace://SpacesStore/cc8c446f-ac4e-40e5-b040-08f1030b708e"
]
},
{
"displayName": "Is Latest Major Version",
"extensions": null,
"firstValue": true,
"id": "cmis:isLatestMajorVersion",
"localName": "isLatestMajorVersion",
"queryName": "cmis:isLatestMajorVersion",
"values": [
true
]
},
{
"displayName": "Content Stream Id",
"extensions": null,
"firstValue": "store://2014/5/29/11/37/64b37543-290c-4800-9b01-dfa76569a031.bin",
"id": "cmis:contentStreamId",
"localName": "contentStreamId",
"queryName": "cmis:contentStreamId",
"values": [
"store://2014/5/29/11/37/64b37543-290c-4800-9b01-dfa76569a031.bin"
]
},
{
"displayName": "Name",
"extensions": null,
"firstValue": "Document1.pdf",
"id": "cmis:name",
"localName": "name",
"queryName": "cmis:name",
"values": [
"Document1.pdf"
]
},
{
"displayName": "Content Stream MIME Type",
"extensions": null,
"firstValue": "application/pdf",
"id": "cmis:contentStreamMimeType",
"localName": "contentStreamMimeType",
"queryName": "cmis:contentStreamMimeType",
"values": [
"application/pdf"
]
},
{
"displayName": "Creation Date",
"extensions": null,
"firstValue": "2014-05-29T18:37:36.345+0000",
"id": "cmis:creationDate",
"localName": "creationDate",
"queryName": "cmis:creationDate",
"values": [
"2014-05-29T18:37:36.345+0000"
]
},
{
"displayName": "Change token",
"extensions": null,
"firstValue": null,
"id": "cmis:changeToken",
"localName": "changeToken",
"queryName": "cmis:changeToken",
"values": []
},
{
"displayName": "Secondary Object Type Ids",
"extensions": null,
"firstValue": "P:cm:thumbnailModification",
"id": "cmis:secondaryObjectTypeIds",
"localName": "secondaryObjectTypeIds",
"queryName": "cmis:secondaryObjectTypeIds",
"values": [
"P:cm:thumbnailModification",
"P:cm:titled",
"P:cm:author",
"P:rn:renditioned",
"P:sys:localized"
]
},
{
"displayName": "Checkin Comment",
"extensions": null,
"firstValue": null,
"id": "cmis:checkinComment",
"localName": "checkinComment",
"queryName": "cmis:checkinComment",
"values": []
},
{
"displayName": "Object Id",
"extensions": null,
"firstValue": "cc8c446f-ac4e-40e5-b040-08f1030b708e;1.0",
"id": "cmis:objectId",
"localName": "objectId",
"queryName": "cmis:objectId",
"values": [
"cc8c446f-ac4e-40e5-b040-08f1030b708e;1.0"
]
},
{
"displayName": "Is Immutable",
"extensions": null,
"firstValue": false,
"id": "cmis:isImmutable",
"localName": "isImmutable",
"queryName": "cmis:isImmutable",
"values": [
false
]
},
{
"displayName": "Is Major Version",
"extensions": null,
"firstValue": true,
"id": "cmis:isMajorVersion",
"localName": "isMajorVersion",
"queryName": "cmis:isMajorVersion",
"values": [
true
]
},
{
"displayName": "Base Type Id",
"extensions": null,
"firstValue": "cmis:document",
"id": "cmis:baseTypeId",
"localName": "baseTypeId",
"queryName": "cmis:baseTypeId",
"values": [
"cmis:document"
]
},
{
"displayName": "Description",
"extensions": null,
"firstValue": null,
"id": "cmis:description",
"localName": "description",
"queryName": "cmis:description",
"values": []
},
{
"displayName": "Last Modified Date",
"extensions": null,
"firstValue": "2014-05-29T18:37:36.345+0000",
"id": "cmis:lastModificationDate",
"localName": "lastModificationDate",
"queryName": "cmis:lastModificationDate",
"values": [
"2014-05-29T18:37:36.345+0000"
]
},
{
"displayName": "Content Stream Filename",
"extensions": null,
"firstValue": "Document1.pdf",
"id": "cmis:contentStreamFileName",
"localName": "contentStreamFileName",
"queryName": "cmis:contentStreamFileName",
"values": [
"Document1.pdf"
]
}
]
}