0

I am trying to use Python API "pyes" to handel elasticsearch but I could not get it up the first time, i am running the following code:

import pyes
conn = pyes.ES('127.0.0.1:9200')
conn.indices.create_index("test-index")

And getting the following error:

No handlers could be found for logger "pyes"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/easd/data01/binmaham/python/lib/python2.7/site-packages/pyes-0.99.2-py2.7.egg/pyes/managers.py", line 155, in create_index
    return self.conn._send_request('PUT', index, settings)
  File "/easd/data01/binmaham/python/lib/python2.7/site-packages/pyes-0.99.2-py2.7.egg/pyes/es.py", line 441, in _send_request
    response = self.connection.execute(request)
  File "/easd/data01/binmaham/python/lib/python2.7/site-packages/pyes-0.99.2-py2.7.egg/pyes/connection_http.py", line 109, in execute
    self._local.server = server = self._get_server()
  File "/easd/data01/binmaham/python/lib/python2.7/site-packages/pyes-0.99.2-py2.7.egg/pyes/connection_http.py", line 145, in _get_server
    raise NoServerAvailable(ex)
pyes.exceptions.NoServerAvailable: list index out of range
3
  • 2
    Is Elasticsearch running on your local server? Commented Jun 29, 2014 at 5:33
  • @JohnPetrone So, this statement doesn't run it by default? duhh Commented Jun 29, 2014 at 5:43
  • Why can't you run elasticsearch within the app itself? Commented Nov 9, 2014 at 20:04

1 Answer 1

2

as @furas and your error messages suggests, to start your ElasticSearch server run sudo /etc/init.d/elasticsearch start as you can read here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.