From 05f8648ad3c8997afc61ec460aa150e1d7b4fcdb Mon Sep 17 00:00:00 2001 From: Erik Pragt Date: Sat, 28 Jun 2014 23:24:56 +0200 Subject: [PATCH 1/3] Updated outdated information. --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a58ee63..0f2b06f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # play2-elasticsearch =================== -This module provides an easy [Elasticsearch](http://www.elasticsearch.org/)(v0.90.12) integration in a [Playframework](http://www.playframework.com/) 2 application +This module provides easy [Elasticsearch](http://www.elasticsearch.org/)(v1.1.0) integration in a [Playframework](http://www.playframework.com/) 2 application ![Playframework](http://fr.clever-age.com/local/cache-vignettes/L220xH78/play-logo-13d8c.png "Playframework") ![Elasticsearch](http://fr.clever-age.com/local/cache-vignettes/L250xH78/logoelasticsearchsmall-292be.png "Elasticsearch") @@ -10,8 +10,6 @@ This module provides an easy [Elasticsearch](http://www.elasticsearch.org/)(v0.9 ## Versions -For Playframework version **2.0.x**, see **README-2.0.x.md** - Module | Playframework | Elasticsearch | Comments | Diff --- | --- | --- | --- | --- 0.5.0 | 2.1-RC1 | 0.19.10 | Compatibility with play 2.1-RC1 @@ -26,13 +24,13 @@ Module | Playframework | Elasticsearch | Comments | Diff 0.8-SNAPSHOT | 2.2.1 | 0.90.12 | Upgrade to ES 0.90.12 & play 2.2.1 0.8.1 | 2.2.1 | 0.90.12 | Upgrade to ES 0.90.12 & play 2.2.1 0.8.2 | 2.2.1 | 0.90.12 | Small fixes - 1.1.0 | 2.2.1 | 1.1.0 | Upgrading the ES 1.1.0 (#47) + 1.1.0 | 2.2.1 | 1.1.0 | Upgrading to ES 1.1.0 (#47) ## Install The dependency declaration is : ``` -"com.clever-age" % "play2-elasticsearch" % "0.8.2" +"com.clever-age" % "play2-elasticsearch" % "1.1.0" ``` Since v0.8.1, releases are published on maven-central, so you don't have to define any specific resolvers. @@ -52,7 +50,7 @@ version := "1.0-SNAPSHOT" libraryDependencies ++= Seq( jdbc, cache, - "com.clever-age" % "play2-elasticsearch" % "0.8.2" + "com.clever-age" % "play2-elasticsearch" % "1.1.0" ) play.Project.playScalaSettings From da57b108a56cc557540e7dd47abdcaf824e284d7 Mon Sep 17 00:00:00 2001 From: Erik Pragt Date: Sat, 28 Jun 2014 23:27:38 +0200 Subject: [PATCH 2/3] Removed outdated documentation. --- README-2.0.x.md | 118 ------------------------------------------------ 1 file changed, 118 deletions(-) delete mode 100644 README-2.0.x.md diff --git a/README-2.0.x.md b/README-2.0.x.md deleted file mode 100644 index 9e5b66b..0000000 --- a/README-2.0.x.md +++ /dev/null @@ -1,118 +0,0 @@ -# play2-elasticsearch -=================== - -This module provides an easy [Elasticsearch](http://www.elasticsearch.org/)(v0.20.4) integration in a [Playframework](http://www.playframework.com/) 2 application - -[![Build Status](https://travis-ci.org/cleverage/play2-elasticsearch.png?branch=master)](https://travis-ci.org/cleverage/play2-elasticsearch) - -## Versions -Module | Playframework | Elasticsearch | Comments ---- | --- | --- | --- - 0.1 | 2.0.3 | 0.19.4 | Initial version - 0.2 | 2.0.3 | 0.19.4 | Percolators support - 0.3 | 2.0.3 | 0.19.4 | IndexResult : adding pagination data - 0.4 | 2.0.3 | 0.19.10 | Upgrade ES to 0.19.10 - 0.4.1 | 2.0.3 | 0.19.10 | Allow advanced query ( with highlight, .... ) - 0.4.2 | 2.0.4 | 0.19.10 | Upgrade play2.0.4 + allow index settings in conf - -## Install - -The dependency declaration is : -``` -"com.github.cleverage" % "elasticsearch_2.9.1" % "0.4.2" -``` - -You should use the following resolver : -``` -resolvers += Resolver.url("GitHub Play2-elasticsearch Repository", url("http://cleverage.github.com/play2-elasticsearch/releases/"))(Resolver.ivyStylePatterns) -``` - -So the Build.scala should look like : -``` -import sbt._ -import Keys._ -import PlayProject._ - -object ApplicationBuild extends Build { - - val appName = "elasticsearch-sample" - val appVersion = "1.0-SNAPSHOT" - - val appDependencies = Seq( - // Add your project dependencies here, - "com.github.cleverage" % "elasticsearch_2.9.1" % "0.4.2" - ) - - val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings( - // Add your own project settings here - resolvers += Resolver.url("GitHub Play2-elasticsearch Repository", url("http://cleverage.github.com/play2-elasticsearch/releases/"))(Resolver.ivyStylePatterns) - ) -} -``` - -## Activate the plugin - -The 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), -just create it in the conf directory first, and then add -``` -9000:com.github.cleverage.elasticsearch.plugin.IndexPlugin -``` - -## Configuration -You can configure the module in conf/application.conf (or in any configuration file included in your application.conf) - -``` -## ElasticSearch Configuration -############################## -## define local mode or not -elasticsearch.local=false - -## Coma-separated list of clients -elasticsearch.client="192.168.0.46:9300" -# ex : elasticsearch.client="192.168.0.46:9300,192.168.0.47:9300" - -## Name of the index -elasticsearch.index.name="play2-elasticsearch" - -## Custom settings to apply when creating the index (optional) -elasticsearch.index.settings="{ analysis: { analyzer: { my_analyzer: { type: \"custom\", tokenizer: \"standard\" } } } }" - -## define package or class separate by commas for loading @IndexType and @IndexMapping information -elasticsearch.index.clazzs="indexing.*" - -## show request & result json of search request in log (it will be logged using Logger.debug()) -elasticsearch.index.show_request=true -``` - -## Usage - -### HelloWorld -Create a Class extending "com.github.cleverage.elasticsearch.Index" - -Example : [IndexTest.java](https://github.com/cleverage/play2-elasticsearch/blob/master/samples/elasticsearch-java/app/indexing/IndexTest.java) - -``` -IndexTest indexTest = new IndexTest(); -indexTest.name = "hello World"; -indexTest.index(); - -IndexTest byId = IndexTest.find.byId("1"); - -IndexResults all = IndexTest.find.all(); - -IndexQuery indexQuery = IndexTest.find.query(); -indexQuery.setBuilder(QueryBuilders.queryString("hello")); -IndexResults results = IndexTest.find.search(indexQuery); - -``` - -### More Complex -Example : https://github.com/cleverage/play2-elasticsearch/blob/master/samples/elasticsearch-java/app/indexing/Team.java - -See samples/elasticsearch-java application for more sample - -## Authors -http://twitter.com/nboire & http://twitter.com/mguillermin - -## License -This code is released under the MIT License \ No newline at end of file From c8ceebbb33dafcf24ba86f4c74ca93e809fa29a8 Mon Sep 17 00:00:00 2001 From: Erik Pragt Date: Sun, 29 Jun 2014 22:17:38 +0200 Subject: [PATCH 3/3] Replaced build.sbt with Build.scala information --- README.md | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 0f2b06f..82f8638 100644 --- a/README.md +++ b/README.md @@ -40,23 +40,25 @@ If you want to use a snapshot version, you will have to register the Sonatype OS resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" ``` -Your `build.sbt` should look like : +So the `Build.scala` should look like: ``` +import sbt._ -name := "test-play2-elasticsearch" +object ApplicationBuild extends Build { -version := "1.0-SNAPSHOT" + val appName = "elasticsearch-sample" + val appVersion = "0.1-SNAPSHOT" -libraryDependencies ++= Seq( - jdbc, - cache, - "com.clever-age" % "play2-elasticsearch" % "1.1.0" -) + val appDependencies = Seq( + "com.clever-age" % "play2-elasticsearch" % "1.1.0" + ) -play.Project.playScalaSettings - -// Uncomment this line if you use a snapshot version -// resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" + val main = play.Project(appName, appVersion, appDependencies).settings( + // Add your own project settings here + // Uncomment this line if you use a snapshot version + // resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" + ) +} ``` ## Activate the plugin