Elasticsearch analyze() not compatible with Spark in Python?
问题 I'm using the elasticsearch-py client within PySpark using Python 3 and I'm running into a problem using the analyze() function with ES in conjunction with an RDD. In particular, each record in my RDD is a string of text and I'm trying to analyze it to get out the token information, but I'm getting an error when trying to use it within a map function in Spark. For example, this works perfectly fine: from elasticsearch import Elasticsearch es = Elasticsearch() t = 'the quick brown fox' es