Hi everyone,
I have an java application which uses Elasticsearch and RestHighLevelClient.
The application simply reads csv files and creates a List of Maps java using Jackson CSV Mapper.
After that the Map is indexed in Elasticsearch by BulkRequest
BulkRequest bulkRequest = new BulkRequest();
for ( Map<String, Object> value : data ) {
bulkRequest.add(new IndexRequest(index).source(value));
}
BulkResponse br = restHighLevelClient.bulk(bulkRequest, RequestOptions.DEFAULT);
I have not make any class corresponding to document in Java .
Now I am migrating my source code to new JavaAPI Client and using ElasticsearchClient in place of RestHighLevelClient.
Can, anyone guide me through how to create BulkRequest using ElasticsearchClient using Map only and not defining Document class because what i have seen mentioning Document type has been made mandatory.
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.