Cannot handle type while writing dataframe to ES

Hi,

I am seeing this exception while writing an RDD to ES

Caused by: org.elasticsearch.hadoop.serialization.EsHadoopSerializationException: Cannot handle type [class scala.Enumeration$Val] ...

My object has Enumeration values in it. Is there something I need to do to avoid these exceptions?

We do not currently support serializing enums in the connector. You should convert the enum fields into strings using a map call in Spark and map them as keywords in Elasticsearch.

1 Like

Thanks. I did that and this error was gone. Forgot to post my answer earlier.

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