Code is to insert the index into index 'ltables' with the jSON structure as below in the exception trace. Please let me know what iam doing wrong, i do not
want all of the fields to be indexed and hence i executed the mapping as shown below from Kibana manually, before executing the Java code.
So my understanding is that since i have turned off indexing for all fields expect for the ones for which i want as per mapping. Please let me know what do i need to do to store the JSON into index .
Exception in thread "main" InvalidTypeNameException[mapping type name [{"tables":{"dbEntityName":"TFCOMMAREA_HOLD","otherEntityName":null,"entityAttributes":[{"legacyEntityAttributeName":"HOUSEHOLD_NUM","legacyEntAttrCharacteristics":null,"entMiscProp":null,"gwentityAttributeName":"AccountNumber","gwtableName":"pc_account","gwentAttrCharacteristics":null}]}}] is too long; limit is length 255 but was [289]]
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:277)
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:265)
at org.elasticsearch.cluster.metadata.MetaDataMappingService$2.execute(MetaDataMappingService.java:444)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:388)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Mapping
PUT ltables
{
"mappings": {
"tables": {
"_all": { "enabled": false },
"properties": {
"dbEntityName": {
"type": "string",
"index": "not_analyzed"
},
"otherEntityName": {
"type": "string",
"index": "not_analyzed"
},
"entityAttributes": {
"type": "nested" ,
"properties": {
"legacyEntityAttributeName": {
"type": "string",
"index": "not_analyzed"
},
"gwentityAttributeName": {
"type": "string",
"index": "not_analyzed"
},
"gwtableName": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
}
}