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

Elastic - spark : deprecated search_type=scan showing up in post url from spark 2.4 and returning 0 hits #1241

Closed
john-marshal opened this issue Jan 31, 2019 · 3 comments
Labels

Comments

@john-marshal
Copy link

What kind an issue is this?

Am trying to fetch data from elastic server into spark 2.4 environment using "org.elasticsearch.spark.sql" connector, but even though i got all the configs right, there is no data received on the spark engine

Using the below config to connect to Elastic from spark

image

Issue description

On analyzing with fiddler found that the request created had a search_type=scan param in the query string, which i guess is no longer supported

http://NodeURL/index/type/_search?search_type=scan&scroll=5m&size=50&preference=_shards%3A3%3B_local

On opening this on the browser didn't receive any data, but the same query without the search_type param worked as expected.

Am wondering when the above param is no longer supported, why is it being appended in the request url by the elasticsearch-spark connector

Version Info

spark - 2.4.0
scala - 2.11
elasticsearch-spark-20_2.11 (6.6.0)
OS: : Win 10
JVM : jdk1.8.0_181

Can someone please help me figure out a way to fetch data

@jbaiera
Copy link
Member

jbaiera commented May 21, 2019

Which version of Elasticsearch are you running against?

@jbaiera
Copy link
Member

jbaiera commented May 21, 2019

The only reason the search_type parameter gets added to the request is if it is running on a version earlier than 5.0, and there is currently an existing issue where more recent versions of ES-Hadoop reading from 2.x versions of Elasticsearch are not returning results. See #1277

@jbaiera
Copy link
Member

jbaiera commented Aug 8, 2019

Closing this as there has been no further feedback

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

No branches or pull requests

2 participants