Using Elastic 8 with JAVA client.I first created template of mapping like below
Index Name=A is created two in elastic 8 server instead of overwritingalready present mapping file
Note: to be more efficient (payload wise), I'd rewrite your code as is:
co.elastic.clients.elasticsearch.core.BulkRequest.Builder bulkBuilder=new Builder();
bulkBuilder.index(INDEX_NAME);
for (MyObj o : obj) {
bulkBuilder.operations(op->op.index(idx->idx.document(o)));
}
As it does not work for you, could you share the template mapping you defined (and the command you used to define it)?
Also, what is the real index name. I suppose it's not A.
I get only one index mapping .this issue got resolved after i created another index with diffrent name.May be it was chrome elastichead plugin it went crazy showing two index with same name when i searched index in elastic head plugin.
Sorry for bothering you
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.