I create index with
client.admin().indices().preparePutMapping(indexName)
.setType(documentType)
.setSource(builder)
.get();
builder.startObject(SearchDocumentFieldName.TIMESTAMP.getFieldName())
.field("type" "long")
.field("index","not_analyzed")
.endObject()
.startArray("arrays")
.startObject()
.field("type"), "string")
.field("index", "not_analyzed")
.endObject()
.endArray();
output:
{
"documentname" : {
"dynamic" : "strict",
"_all" : {
"enabled" : false
},
"properties" : {
"timestamp" : {
"type" : "long",
"index" : "not_analyzed"
},
"arrays" : [ {
"type" : "string",
"index" : "not_analyzed"
} ]
}
}
ERRORr:MapperParsingException[Expected map for property [fields] on field [arrays] but got a class java.lang.String
]