I an trying to read elastic index from hadoop but getting below error
Caused by: org.elasticsearch.hadoop.EsHadoopIllegalStateException: Field 'app.response.abc' not found; typically this occurs with arrays which are not mapped as single value
Mapping of this particular field is
"abc": { "type": "object" }, "gridStatus": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } },
and I am using below command to read data
`df = spark.read.format("org.elasticsearch.spark.sql").option("es.net.http.auth.user", "username") \
.option("es.net.http.auth.pass", "password") \
.option("es.net.ssl", "true") \
.option("es.net.ssl.cert.allow.self.signed", "true") \
.option("mergeSchema", "true") \
.option('es.index.auto.create', 'true') \
.option('es.nodes', 'w.x.y.z")) \
.option('es.port', '9200') \
.option('es.batch.write.retry.wait', '100s') \
.option("es.mapping.date.rich", False) \
.option("es.read.field.as.array.include" , "app.response.abc") \
.option("es.mapping.include","app.response.response_id") \
.option("es.query", '{"query": {"range": {"@timestamp": {"gte": "2020-08-25 01:00:00", "lte": "2020-08-25 01:30:00", "format": "yyyy-MM-dd HH:mm:ss"}}}}') \
.load("myindex-2020.08.25")`