Generating custom _id when exporting from hadoop/spark to ES

I want to insert data in ES using hadoop/spark but with a custom made _id field (not the autogerated one). I have seen that there is method using RDDs "saveToEsWithMeta":

Is there a way to do the same thing using the a dataframe?

I think that es.mapping.id is what you want. Take a look at Apache Spark support | Elasticsearch for Apache Hadoop [master] | Elastic and Configuration | Elasticsearch for Apache Hadoop [8.3] | Elastic.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.