diff --git a/.travis.yml b/.travis.yml
index 4d787e8..13462a7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,12 @@
language: scala
scala: 2.12.2
jdk: oraclejdk8
-
+dist: trusty
+env:
+ - ES_VERSION=5.6.3 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
+install:
+ - wget ${ES_DOWNLOAD_URL}
+ - tar -xzf elasticsearch-${ES_VERSION}.tar.gz
+ - ./elasticsearch-${ES_VERSION}/bin/elasticsearch &
+script:
+ - wget -q --waitretry=1 --retry-connrefused -T 10 -O - http://127.0.0.1:9200
\ No newline at end of file
diff --git a/app/controllers/HomeController.java b/app/controllers/HomeController.java
index 72060f1..d40c8cf 100644
--- a/app/controllers/HomeController.java
+++ b/app/controllers/HomeController.java
@@ -100,10 +100,10 @@ public Result index() {
}
/**
- * An action that renders an HTML page with a welcome message. The
- * configuration in the routes
file means that this method will
- * be called when the application receives a GET
request with a
- * path of /
.
+ * An action that renders an HTML page with a welcome message. The configuration
+ * in the routes
file means that this method will be called when
+ * the application receives a GET
request with a path of
+ * /
.
*/
public Result api() {
String format = "json";
@@ -156,7 +156,7 @@ public Result authority(String id, String format) {
private List creatorOf(String id) {
String q = String.format("firstAuthor:\"%s\" OR firstComposer:\"%s\"", id, id);
SearchResponse response = index.query(q, "", 0, 1000);
- Stream ids = Arrays.asList(response.getHits().hits()).stream()
+ Stream ids = Arrays.asList(response.getHits().getHits()).stream()
.map(hit -> AuthorityResource.DNB_PREFIX + hit.getId());
return ids.collect(Collectors.toList());
}
@@ -252,7 +252,7 @@ public static String currentUri() {
}
private static String returnAsJson(String q, SearchResponse queryResponse) {
- List