Search code examples
djangodjango-haystack

Django-Haystack List of nodes should not include schema information (http://): 'http://127.0.0.1:9200'


Any time I update my indexes in django-haystack I get the message "List of nodes should not include schema information (http://): 'http://127.0.0.1:9200'."

What does this mean exactly, and why am I seeing it?


Solution

  • You are seeing it because you have that 'http://' as part of your host. You should not be including it. Elasticsearch-py actually strips it out when it is present. See:

    https://github.com/elasticsearch/elasticsearch-py/blob/master/elasticsearch/client/init.py#L37

    If you had ftp://127.0.0.1:9200 , the 'ftp' would be would be your scheme (http://en.wikipedia.org/wiki/URI_scheme) and the code would still strip it off and complain. I haven't dug around the guts enough, but maybe the motivation is that it's reserving the right to prepend different schema as necessary.