Import data from elasticsearch


(Komal Mittal) #1

how can I import data from elasticsearch in python code which is used for k-means clustering?


(Shubham Kumar) #2

you can use elasticsearch-dsl library of python to query data from elasticsearch node.
https://elasticsearch-dsl.readthedocs.io/en/latest/


(Komal Mittal) #3

when I use "from elasticsearch import Elasticsearch" it shows a error
"ImportError: No module named elasticsearch"


(Pjanzen) #4

you need to pip install elasticsearch on the machine where you execute the code.


(Komal Mittal) #5

Thank you
It solved my problem.


(system) #6

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