0

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

Clyde Barrow
  • 1,924
  • 8
  • 30
  • 60

1 Answers1

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