Skip to content

Commit 2001d35

Browse files
committed
Upgrade of the Scala sample
1 parent 61b447a commit 2001d35

File tree

6 files changed

+17
-28
lines changed

6 files changed

+17
-28
lines changed

samples/elasticsearch-scala/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ dist
1313
/.project
1414
/RUNNING_PID
1515
/.settings
16+
/data

samples/elasticsearch-scala/app/controllers/Application.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ object Application extends Controller {
4444
Ok(views.html.index("Your new application is ready."))
4545
}
4646

47-
def async = Action {
47+
def async = Action.async {
4848
IndexTestManager.index(IndexTest("1", "Here is the first name", "First category"))
4949
IndexTestManager.index(IndexTest("2", "Then comes the second name", "First category"))
5050
IndexTestManager.index(IndexTest("3", "Here is the third name", "Second category"))
@@ -63,10 +63,8 @@ object Application extends Controller {
6363
result2 <- IndexTestManager.searchAsync(indexQuery2)
6464
} yield (result1, result2)
6565

66-
Async {
67-
l.map { case (r1, r2) =>
68-
Ok(r1.totalCount + " - " + r2.totalCount)
69-
}
66+
l.map { case (r1, r2) =>
67+
Ok(r1.totalCount + " - " + r2.totalCount)
7068
}
7169

7270
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import play.Project._
2+
3+
name := "elasticsearch-scala"
4+
5+
version := "1.0-SNAPSHOT"
6+
7+
play.Project.playJavaSettings
8+
9+
lazy val esModule = RootProject(file("../../module"))
10+
11+
lazy val root = project.in(file(".")).dependsOn(esModule).aggregate(esModule)

samples/elasticsearch-scala/project/Build.scala

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.12.2
1+
sbt.version=0.13.0

samples/elasticsearch-scala/project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ logLevel := Level.Warn
55
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
66

77
// Use the Play sbt plugin for Play projects
8-
addSbtPlugin("play" % "sbt-plugin" % "2.1.3")
8+
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")

0 commit comments

Comments
 (0)