How to update documents using spark


(saisn) #1

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


(saisn) #2

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()


(system) #3

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