Added support for public metadata response in the search api.

Change-Id: Ic6297c192c813520d1c83c1a35d2206059eadb8e
diff --git a/lite/Changes b/lite/Changes
index 1bc17e8..5cc49c6 100644
--- a/lite/Changes
+++ b/lite/Changes
@@ -1,3 +1,8 @@
+# version 0.62.1
+08/07/2019
+   - Added tests for public metadata response in search api (margaretha, issue #43)
+   - Disabled some tests of unused/disabled web-services (margaretha)
+
 version 0.62
 19/03/2019
   - Added close index controller (margaretha)  
diff --git a/lite/pom.xml b/lite/pom.xml
index a830c0c..67d1421 100644
--- a/lite/pom.xml
+++ b/lite/pom.xml
@@ -3,7 +3,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>de.ids_mannheim.korap</groupId>
 	<artifactId>Kustvakt-lite</artifactId>
-	<version>0.62</version>
+	<version>0.62.1</version>
 	<properties>
 		<java.version>1.8</java.version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -137,7 +137,7 @@
 		<dependency>
 			<groupId>de.ids_mannheim.korap</groupId>
 			<artifactId>Kustvakt-core</artifactId>
-			<version>[0.62,)</version>
+			<version>[0.62.1,)</version>
 		</dependency>
 		<!-- Jersey test framework -->
 		<dependency>
diff --git a/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteSearchControllerTest.java b/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteSearchControllerTest.java
index 7bd2409..fb993be 100644
--- a/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteSearchControllerTest.java
+++ b/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteSearchControllerTest.java
@@ -14,6 +14,7 @@
 import javax.ws.rs.core.MultivaluedMap;
 
 import org.eclipse.jetty.http.HttpStatus;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -35,6 +36,8 @@
     @Autowired
     private SearchKrill searchKrill;
     
+//  EM: The API is disabled
+    @Ignore   
     @Test
     public void testGetJSONQuery () throws KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("query")
@@ -51,7 +54,9 @@
         assertEquals("sentence", node.at("/meta/context").asText());
         assertEquals("13", node.at("/meta/count").asText());
     }
-
+    
+//  EM: The API is disabled
+    @Ignore
     @Test
     public void testbuildAndPostQuery () throws KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("query")
@@ -126,7 +131,9 @@
         assertEquals("opennlp", node.at("/query/wrap/foundry").asText());
     }
 
+//  EM: The API is disabled
     @Test
+    @Ignore
     public void testQueryPost () throws KustvaktException {
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[orth=das]", "poliqarp");
@@ -238,7 +245,9 @@
         assertEquals("GOE/AGA/01784", node.at("/textSigle").asText());
         assertEquals("Belagerung von Mainz", node.at("/title").asText());
     };
-
+    
+//  EM: The API is disabled
+    @Ignore
     @Test
     public void testCollectionQueryParameter () throws KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("query")
@@ -385,6 +394,20 @@
     }
     
     @Test
+    public void testSearchPublicMetadata () throws KustvaktException {
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "[orth=das]").queryParam("ql", "poliqarp")
+                .queryParam("access-rewrite-disabled", "true")
+                .get(ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String query = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(query);
+
+        assertTrue(node.at("/matches/0/snippet").isMissingNode());
+    }
+    
+    @Test
     public void testCloseIndex () throws IOException {
         searchKrill.getStatistics(null);
         assertEquals(true, searchKrill.getIndex().isReaderOpen());