neo4j-contrib / neo4j-elasticsearch

Neo4j ElasticSearch Integration
Apache License 2.0
210 stars 79 forks source link

Integration test fails with Elasticsearch 5.1 #33

Closed rremigius closed 7 years ago

rremigius commented 7 years ago

Running the tests with Elasticsearch 5.1, the ElasticSearchEventHandlerIntegrationTest fails with the following exception in the console:

Jan 13, 2017 2:56:15 PM org.neo4j.elasticsearch.ElasticSearchEventHandler afterCommit
WARNING: Error updating ElasticSearch 
io.searchbox.client.config.exception.NoServerConfiguredException: No Server is assigned to client to connect
santosh-hegde commented 7 years ago

I was facing the same issue. Update the function getJestClient as below which solved my problem.

private JestClient getJestClient(final String hostName) throws Throwable { JestClientFactory factory = new JestClientFactory(); factory.setHttpClientConfig( new HttpClientConfig.Builder(hostName).multiThreaded(true).readTimeout(60000).build()); return factory.getObject(); }

Hope it solves your problem as well.

barathank commented 7 years ago

I am getting the same error when testing the integration with ElasticSearch 5.1 and indexes are not created. Please advise.

santosh-hegde commented 7 years ago

@barathank Have you made changes in the code I specified above?

rremigius commented 7 years ago

@santosh-hegde Your update works, thanks!