Django haystack with elasticsearch, indexing issue Django haystack with elasticsearch, indexing issue elasticsearch elasticsearch

Django haystack with elasticsearch, indexing issue


This does not necessarily mean that your es server is down, especially if you get something reasonable returned with curl -I "127.0.0.1:9200". More likely, this is an issue of your request simply not getting enough time given the speed of connections involved.

Interestingly, the default timeout set in pyelasticsearch is 60 seconds, see def __init__(self, urls, timeout=60, max_retries=0, revival_delay=300): in https://github.com/rhec/pyelasticsearch/blob/master/pyelasticsearch/client.py. However, haystack overwrites that with its default setting, which is 10 seconds, as per self.timeout = connection_options.get('TIMEOUT', 10) in https://github.com/toastdriven/django-haystack/blob/master/haystack/backends/__init__.py.

As you can see though, haystack allows you to easily modify your setting, by adding 'TIMEOUT': 60, to your engine configuration.

And solved :)


I too had the similar problem

sudo service elasticsearch restart

then it worked


are you running

bin/elasticsearch -f 

I think you are not running the searchengine.