Skip to content

Commit

Permalink
dropwizard#19: Update README, update config unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattflax committed Mar 13, 2017
1 parent aee0167 commit 1f61708
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Configuration

The following configuration settings are supported by `EsConfiguration`:

* `nodeClient`: When `true`, `ManagedEsClient` will create a `NodeClient`, otherwise a `TransportClient`; default: `true`
* `nodeClient`: When `true`, `ManagedEsClient` will create a `NodeClient`, otherwise a `TransportClient`; default: `false`
* `servers`: A list of servers for usage with the created TransportClient if `nodeClient` is `false`
* `clusterName`: The name of the Elasticsearch cluster; default: "elasticsearch"
* `settings`: Any additional settings for Elasticsearch, see [Configuration](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/setup-configuration.html)
Expand All @@ -59,6 +59,17 @@ The order of precedence is: `nodeClient`/`servers`/`clusterName` > `settings` >
any setting in `settingsFile` can be overwritten with `settings` which in turn get overwritten by the specific settings
like `clusterName`.

### Notes for Elasticsearch 5.x

Elasticsearch 5 specifically recommends **not** using the NodeClient, and it has been disabled in this
version of the connector.

The preferred alternative is to launch a local coordinating node, with whichever plugins you require,
and use the TransportClient to communicate with that. The coordinating node should join your cluster.

See [Connecting a Client to a Coordinating Only Node](https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client-connected-to-client-node.html)


Maven Artifacts
---------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public class EsConfigurationTest {
new DefaultConfigurationFactoryFactory<EsConfiguration>()
.create(EsConfiguration.class, validator, Jackson.newObjectMapper(), "dw");

@Test
public void defaultConfigShouldBeValid() throws IOException, ConfigurationException {
@Test(expected = ConfigurationException.class)
public void defaultConfigInvalid() throws IOException, ConfigurationException {
configFactory.build();
}

Expand Down

0 comments on commit 1f61708

Please sign in to comment.