Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Values of fields with names containing dots shown as null #854

Open
jimmyjones2 opened this issue Sep 25, 2016 · 2 comments
Open

Values of fields with names containing dots shown as null #854

jimmyjones2 opened this issue Sep 25, 2016 · 2 comments

Comments

@jimmyjones2
Copy link

jimmyjones2 commented Sep 25, 2016

spark-1.6.2-bin-hadoop2.6, elasticsearch-5.0.0-beta1, elasticsearch-hadoop-5.0.0-beta1

curl -XPOST localhost:9200/test7/test -d '{"a.b":0}'
./bin/pyspark --driver-class-path=../elasticsearch-hadoop-5.0.0-beta1/dist/elasticsearch-hadoop-5.0.0-beta1.jar
>>> df7 = sqlContext.read.format("org.elasticsearch.spark.sql").load("test7/test")
>>> df7.show()
+----+
|   a|
+----+
|null|
+----+

Possibly related to #853

@jbaiera
Copy link
Member

jbaiera commented Sep 28, 2016

Another good find. When we create the scroll query to read data in, we specify each of the fields that we want to retrieve to cut down on transfer costs. The scroll request that ends up getting created here is:

localhost:9200/test4/test/_search?sort=_doc&scroll=5m&size=50&_source=a&preference=_shards:3;_local

The key here is that _source=a parameter. Elasticsearch looks for a field named a on the source values to return, and finds no such field, since the field's name is technically a.b. Thus, the a.b field is filtered out and an empty document is returned.

@jbaiera
Copy link
Member

jbaiera commented Oct 24, 2016

This should be addressed with elastic/elasticsearch#20736, but will still probably have issues with #853

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants