Elastic search exclude few fields while reading


I am using elasticsearch spark connector and trying to use es.read.field.exclude to exclude reading two fields. In the documentation there is this example given

es.read.field.exclude = company.income

I have two fields host.ip and host.mac which i am trying to exclude. How do i use this configuration when there are more than 1 field?

try like this ("es.read.field.exclude","host.ip,host.mac")

val conf = new SparkConf().setAppName("elastic").setMaster("local[*]")

Thanks @Gokul6 . That works.

1 Like

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