{"id":20601193,"url":"https://github.com/cleverage/play2-elasticsearch","last_synced_at":"2025-08-20T20:32:46.040Z","repository":{"id":539615,"uuid":"4494145","full_name":"cleverage/play2-elasticsearch","owner":"cleverage","description":"Elasticsearch module for PlayFramework 2.x applications","archived":false,"fork":false,"pushed_at":"2016-03-14T13:49:48.000Z","size":2190,"stargazers_count":153,"open_issues_count":22,"forks_count":63,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-12-11T14:05:43.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cleverage.png","metadata":{"files":{"readme":"README-2.0.x.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":"2012-05-30T11:49:52.000Z","updated_at":"2023-06-25T03:17:04.000Z","dependencies_parsed_at":"2022-08-06T09:15:43.689Z","dependency_job_id":null,"html_url":"https://github.com/cleverage/play2-elasticsearch","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleverage%2Fplay2-elasticsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleverage%2Fplay2-elasticsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleverage%2Fplay2-elasticsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleverage%2Fplay2-elasticsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cleverage","download_url":"https://codeload.github.com/cleverage/play2-elasticsearch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230454431,"owners_count":18228392,"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":[],"created_at":"2024-11-16T09:08:58.710Z","updated_at":"2024-12-19T15:09:28.020Z","avatar_url":"https://github.com/cleverage.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# play2-elasticsearch\n===================\n\nThis module provides an easy [Elasticsearch](http://www.elasticsearch.org/)(v0.20.4) integration in a [Playframework](http://www.playframework.com/) 2 application\n\n[![Build Status](https://travis-ci.org/cleverage/play2-elasticsearch.png?branch=master)](https://travis-ci.org/cleverage/play2-elasticsearch)\n\n## Versions\nModule | Playframework | Elasticsearch | Comments\n--- | --- | --- | ---\n 0.1 | 2.0.3 | 0.19.4 | Initial version\n 0.2 | 2.0.3 | 0.19.4 | Percolators support\n 0.3 | 2.0.3 | 0.19.4 | IndexResult : adding pagination data\n 0.4 | 2.0.3 | 0.19.10 | Upgrade ES to 0.19.10\n 0.4.1 | 2.0.3 | 0.19.10 | Allow advanced query ( with highlight, .... ) \n 0.4.2 | 2.0.4 | 0.19.10 | Upgrade play2.0.4 + allow index settings in conf \n \n## Install\n\nThe dependency declaration is :\n```\n\"com.github.cleverage\" % \"elasticsearch_2.9.1\" % \"0.4.2\"\n```\n\nYou should use the following resolver :\n```\nresolvers += Resolver.url(\"GitHub Play2-elasticsearch Repository\", url(\"http://cleverage.github.com/play2-elasticsearch/releases/\"))(Resolver.ivyStylePatterns)\n```\n\nSo the Build.scala should look like : \n```\nimport sbt._\nimport Keys._\nimport PlayProject._\n\nobject ApplicationBuild extends Build {\n\n    val appName         = \"elasticsearch-sample\"\n    val appVersion      = \"1.0-SNAPSHOT\"\n\n    val appDependencies = Seq(\n      // Add your project dependencies here,\n      \"com.github.cleverage\" % \"elasticsearch_2.9.1\" % \"0.4.2\"\n    )\n\n    val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(\n      // Add your own project settings here      \n      resolvers += Resolver.url(\"GitHub Play2-elasticsearch Repository\", url(\"http://cleverage.github.com/play2-elasticsearch/releases/\"))(Resolver.ivyStylePatterns)\n    )\n}\n```\n\n## Activate the plugin\n\nThe Play2-elasticsearch module requires its plugin class to be declared in the conf/play.plugins file. If this file doesn't exist (it's not created by default when you create a new project),\njust create it in the conf directory first, and then add\n```\n9000:com.github.cleverage.elasticsearch.plugin.IndexPlugin\n```\n\n## Configuration\nYou can configure the module in conf/application.conf (or in any configuration file included in your application.conf)\n\n```\n## ElasticSearch Configuration\n##############################\n## define local mode or not\nelasticsearch.local=false\n\n## Coma-separated list of clients\nelasticsearch.client=\"192.168.0.46:9300\"\n# ex : elasticsearch.client=\"192.168.0.46:9300,192.168.0.47:9300\"\n\n## Name of the index\nelasticsearch.index.name=\"play2-elasticsearch\"\n\n## Custom settings to apply when creating the index (optional)\nelasticsearch.index.settings=\"{ analysis: { analyzer: { my_analyzer: { type: \\\"custom\\\", tokenizer: \\\"standard\\\" } } } }\"\n\n## define package or class separate by commas for loading @IndexType and @IndexMapping information\nelasticsearch.index.clazzs=\"indexing.*\"\n\n## show request \u0026 result json of search request in log (it will be logged using Logger.debug())\nelasticsearch.index.show_request=true\n```\n\n## Usage\n\n### HelloWorld\nCreate a Class extending \"com.github.cleverage.elasticsearch.Index\"\n\nExample : [IndexTest.java](https://github.com/cleverage/play2-elasticsearch/blob/master/samples/elasticsearch-java/app/indexing/IndexTest.java)\n\n```\nIndexTest indexTest = new IndexTest();\nindexTest.name = \"hello World\";\nindexTest.index();\n\nIndexTest byId = IndexTest.find.byId(\"1\");\n\nIndexResults\u003cIndexTest\u003e all = IndexTest.find.all();\n\nIndexQuery\u003cIndexTest\u003e indexQuery = IndexTest.find.query();\nindexQuery.setBuilder(QueryBuilders.queryString(\"hello\"));\nIndexResults\u003cIndexTest\u003e results = IndexTest.find.search(indexQuery);\n\n```\n\n### More Complex\nExample : https://github.com/cleverage/play2-elasticsearch/blob/master/samples/elasticsearch-java/app/indexing/Team.java\n\nSee samples/elasticsearch-java application for more sample\n\n## Authors\nhttp://twitter.com/nboire \u0026 http://twitter.com/mguillermin\n\n## License\nThis code is released under the MIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleverage%2Fplay2-elasticsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleverage%2Fplay2-elasticsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleverage%2Fplay2-elasticsearch/lists"}