Elasticsearch.spark.sql queries return null

I connect to remote elastic search. when I load my index data metadata column has information but all of other fields that are in "doc" column are null.

spark 2.4.0
elasticsearch-hadoop-7.0.1.jar

output:

schema:
root
|-- doc: struct (nullable = true)
| |-- screen_name: string (nullable = true)
|-- _metadata: map (nullable = true)
| |-- key: string
| |-- value: string (valueContainsNull = true)

+----+-------------------------------------------------------------------------------+
|doc |_metadata |
+----+-------------------------------------------------------------------------------+
|null|[_index -> ab_fa, _type -> doc, _id -> 152515152, _score -> 16.521849]|
+----+-------------------------------------------------------------------------------+

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