How to update documents using spark

How can i update documents in an index using document_id in spark. I've seen the option called es.mappings.id but can it be used with multiple fields.

For eg:

I had two fields userid,serialno and i want to create document_id as %{userid}%{serialno} in spark.

Thanks

I'm able to do for one column using es.mapping.id. Can someone tell me how i can include two or more columns as document id

df.write.format("org.elasticsearch.spark.sql").option("es.mapping.id","userid").option("es.resource","testindex/abc").save()

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