I'm trying to get a simple example working with elastic search using pyes, but I'm having trouble getting the starting examples working. I'm following the documentation found here: http://pyes.readthedocs.org/en/latest/manual/usage.html
and just trying to run the following function, but It's not quite working.
def index_transcripts():
conn = ES('127.0.0.1:9200')
conn.indices.create_index("test-index")
index_transcripts()
Which in my mind should be very straightforward, but instead I get the following error:
pyes.exceptions.NoServerAvailable: list index out of range
I'm just starting out with Elastic Search and pyes seems like a wonderful library, but I'm clearly uncertain on how exactly I should use it. Any help would be greatly appreciated.
This will work:
ES(server=[('http', 'localhost', 9200)])
Server is a list of tuples.
Documentation to this is here: http://pyes.readthedocs.org/en/latest/references/pyes.connection.html