How to save spark scala dataframe to elastic search

i am using this df to save into elasticsearch but it showing error
--- ERROR NetworkClient: Node [] failed (Connection timed out: connect); no other nodes left - aborting... --

.option("es.nodes.client.only", "false")

i m running this on windows but not working .

Please avoid double posting on here as it creates clutter and makes it harder for people to respond or find answers. I will respond on your other topic.