I want to create an index in Elasticsearch from my spark transformation. I wonder what is the best method to do it using the elasticsearch-spark library ? Kind regards
Asked
Active
Viewed 81 times
1 Answers
0
When writing to the elasticsearch it will create an index if not present
df.write
.format("org.elasticsearch.spark.sql")
.option("es.nodes.wan.only","true")
.option("es.port","443")
.option("es.nodes", esURL)
.mode("Overwrite")
.save("index/dogs")

Sunder R
- 1,074
- 1
- 7
- 21