Python with elasticsearch


(Ahmed HADDAD) #1

Hi,
How to use python with elasticsearch.
i've just understand this line of installation

 pip install elasticsearch

but how to write python scripts and connect them to elasticsearch


(Christian Dahlqvist) #2

Have you looked at the documentation for the Python Elasticsearch client?


(Ahmed HADDAD) #3

Yes After Installation there is example of usage ('helloworld in other terms') but where would i write that the environment i mean and how to be sure that is connected ?


(Christian Dahlqvist) #4

I do not understand your question. The initial example assumes you are connecting using the defaults (localhost on port 9200). If this does not apply to your Elasticsearch instance, you can find examples of how to set host name etc further along in the docs.


(Ahmed HADDAD) #5

should i just run jupter and type the code there ?


(Christian Dahlqvist) #6

How do you usually develop, test and run python scripts?


(Ahmed HADDAD) #7

i didn't it is the second time i would use it.
but i know jupyter


(Christian Dahlqvist) #8

I have not used jupyter, so will not be able to help you with that.


(Ahmed HADDAD) #9

Solved,
i used ElasticSearch with Anconda
just type this in Anconda command prompt

conda install -c conda-forge elasticsearch

(system) #10

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