Hi everybody:
I have installed ElasticSearch 1.9.0 and Wagtail 1.6 in my virtualenv. in my base.py i added:
WAGTAILSEARCH_BACKENDS = {
'default': {
'BACKEND': 'wagtail.wagtailsearch.backends.elasticsearch.ElasticSearch',
'URLS': ['http://locahost:9200'], #i try with localhost:8000, not working too
'AUTO_UPDATE': False,
'INDEX': '<nameOfMyProject>',
'TIMEOUT':5,
},
}
In the model, i added:
search_fields = (
index.SearchField('c1_title_fr', partial_match=True, boost=10),
index.SearchField('c1_subtitle_fr', partial_match=True, boost=10),
index.SearchField('c2_title_fr', partial_match=True),
index.SearchField('c2_subtitle_fr', partial_match=True),
index.SearchField('simulator_title_fr', partial_match=True),
index.SearchField('simulator_text_fr', partial_match=True),
index.SearchField('benefits_title_fr', partial_match=True),
index.SearchField('app_text_fr', partial_match=True),
)
But when i make 'python manage.py update_index', i have this error:
elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f7db56a2780>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f7db56a2780>: Failed to establish a new connection: [Errno 111] Connection refused)
if i change 'URLS' to ['http:localhost:8000] and i make 'runserver' in 8000 port,the error is:
elasticsearch.exceptions.TransportError: TransportError(302, '')
Any idea to solve it?
Thx