{"id":13806137,"url":"https://github.com/dropwizard/dropwizard-elasticsearch","last_synced_at":"2025-05-13T21:32:28.389Z","repository":{"id":547657,"uuid":"12068070","full_name":"dropwizard/dropwizard-elasticsearch","owner":"dropwizard","description":"A set of classes for using Elasticsearch in a Dropwizard service.","archived":true,"fork":false,"pushed_at":"2022-11-18T12:08:00.000Z","size":1380,"stargazers_count":59,"open_issues_count":8,"forks_count":43,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-15T12:35:05.400Z","etag":null,"topics":["dropwizard","elasticsearch"],"latest_commit_sha":null,"homepage":"http://dropwizard.github.io/dropwizard-elasticsearch/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dropwizard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-12T22:46:20.000Z","updated_at":"2024-01-24T05:28:43.000Z","dependencies_parsed_at":"2022-08-16T10:30:45.579Z","dependency_job_id":null,"html_url":"https://github.com/dropwizard/dropwizard-elasticsearch","commit_stats":null,"previous_names":["joschi/dropwizard-elasticsearch"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropwizard%2Fdropwizard-elasticsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropwizard%2Fdropwizard-elasticsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropwizard%2Fdropwizard-elasticsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropwizard%2Fdropwizard-elasticsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dropwizard","download_url":"https://codeload.github.com/dropwizard/dropwizard-elasticsearch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254031312,"owners_count":22002745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dropwizard","elasticsearch"],"created_at":"2024-08-04T01:01:08.241Z","updated_at":"2025-05-13T21:32:27.951Z","avatar_url":"https://github.com/dropwizard.png","language":"Java","readme":"Dropwizard Elasticsearch\n========================\n\n[![Build Status](https://travis-ci.org/dropwizard/dropwizard-elasticsearch.svg?branch=master)](https://travis-ci.org/dropwizard/dropwizard-elasticsearch)\n[![Coverage Status](https://img.shields.io/coveralls/dropwizard/dropwizard-elasticsearch.svg)](https://coveralls.io/r/dropwizard/dropwizard-elasticsearch)\n[![Maven Central](https://img.shields.io/maven-central/v/io.dropwizard.modules/dropwizard-elasticsearch.svg)](http://mvnrepository.com/artifact/io.dropwizard.modules/dropwizard-elasticsearch)\n\nA set of classes for using [Elasticsearch][1] (version 2.3.0 and higher) in a [Dropwizard][2] application.\n\nThe package provides a [lifecycle-managed][3] client class (`ManagedEsClient`), a configuration class with the most\ncommon options (`EsConfiguration`), and some [health checks][4] which can instantly be used in any Dropwizard application.\n\n[1]: http://www.elasticsearch.org/\n[2]: http://dropwizard.io/1.2.0/docs\n[3]: http://dropwizard.io/1.2.0/docs/manual/core.html#managed-objects\n[4]: http://dropwizard.io/1.2.0/docs/manual/core.html#health-checks\n\n\nUsage\n-----\n\nJust add `EsConfiguration` to your [Configuration](http://dropwizard.io/1.2.0/docs/manual/core.html#configuration) class and\ncreate an `ManagedEsClient` instance in the run method of your service.\n\nYou can also add one of the existing health checks to your [Environment](http://dropwizard.io/1.2.0/docs/manual/core.html#environments)\nin the same method. At least the usage of `EsClusterHealthCheck` is strongly advised.\n\n```java\npublic class DemoApplication extends Application\u003cDemoConfiguration\u003e {\n    // [...]\n    @Override\n    public void run(DemoConfiguration config, Environment environment) {\n        final ManagedEsClient managedClient = new ManagedEsClient(configuration.getEsConfiguration());\n        environment.lifecycle().manage(managedClient);\n        environment.healthChecks().register(\"ES cluster health\", new EsClusterHealthCheck(managedClient.getClient()));\n        // [...]\n    }\n}\n```\n\nConfiguration\n-------------\n\nThe following configuration settings are supported by `EsConfiguration`:\n\n* `nodeClient`: When `true`, `ManagedEsClient` will create a `NodeClient`, otherwise a `TransportClient`; default: `true`\n* `servers`: A list of servers for usage with the created TransportClient if `nodeClient` is `false`\n* `clusterName`: The name of the Elasticsearch cluster; default: \"elasticsearch\"\n* `settings`: Any additional settings for Elasticsearch, see [Configuration](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/setup-configuration.html)\n* `settingsFile`: Any additional settings file for Elasticsearch, see [Configuration](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/setup-configuration.html)\n\nAn example configuration file for creating a Node Client could like this:\n\n```yaml\nclusterName: MyClusterName\nsettings:\n  node.name: MyCustomNodeName\n```\n\nThe order of precedence is: `nodeClient`/`servers`/`clusterName` \u003e `settings` \u003e `settingsFile`, meaning that\nany setting in `settingsFile` can be overwritten with `settings` which in turn get overwritten by the specific settings\nlike `clusterName`.\n\nMaven Artifacts\n---------------\n\nThis project is available on Maven Central. To add it to your project simply add the following dependencies to your\n`pom.xml`:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.dropwizard.modules\u003c/groupId\u003e\n  \u003cartifactId\u003edropwizard-elasticsearch\u003c/artifactId\u003e\n  \u003cversion\u003e1.2.0-1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nSupport\n-------\n\nPlease file bug reports and feature requests in [GitHub issues](https://github.com/dropwizard/dropwizard-elasticsearch/issues).\n\n\nAcknowledgements\n----------------\n\nThanks to Alexander Reelsen (@spinscale) for his [Dropwizard Blog Sample](https://github.com/spinscale/dropwizard-blog-sample)\nwhich sparked the idea for this project.\n\n\nLicense\n-------\n\nCopyright (c) 2013-2017 Jochen Schalanda\n\nThis library is licensed under the Apache License, Version 2.0.\n\nSee http://www.apache.org/licenses/LICENSE-2.0.html or the LICENSE file in this repository for the full license text.\n","funding_links":[],"categories":["Open Source"],"sub_categories":["Data Stores"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropwizard%2Fdropwizard-elasticsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdropwizard%2Fdropwizard-elasticsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropwizard%2Fdropwizard-elasticsearch/lists"}