diff --git a/core/Changes b/core/Changes
index 62aa351..5051644 100644
--- a/core/Changes
+++ b/core/Changes
@@ -1,3 +1,10 @@
+# version 0.62.1
+08/07/2019
+   - Added support for public metadata response in search api (margaretha, 
+     issue #43)
+   - Disabled some unused web-services: search post, query serialization, 
+     collocation base (margaretha)
+
 # version 0.62
 18/03/2019
    - Added close index controller (margaretha)
diff --git a/core/pom.xml b/core/pom.xml
index ae28c9c..a3c9da7 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -3,7 +3,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>de.ids_mannheim.korap</groupId>
 	<artifactId>Kustvakt-core</artifactId>
-	<version>0.62</version>
+	<version>0.62.1</version>
 
 	<properties>
 		<java.version>1.8</java.version>
diff --git a/core/src/main/java/de/ids_mannheim/korap/service/SearchService.java b/core/src/main/java/de/ids_mannheim/korap/service/SearchService.java
index 5d3953f..35f3547 100644
--- a/core/src/main/java/de/ids_mannheim/korap/service/SearchService.java
+++ b/core/src/main/java/de/ids_mannheim/korap/service/SearchService.java
@@ -16,6 +16,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.fasterxml.jackson.databind.JsonNode;
 import com.sun.jersey.core.util.MultivaluedMapImpl;
 
 import de.ids_mannheim.de.init.VCLoader;
@@ -28,6 +29,7 @@
 import de.ids_mannheim.korap.rewrite.RewriteHandler;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.user.User.CorpusAccess;
+import de.ids_mannheim.korap.utils.JsonUtils;
 import de.ids_mannheim.korap.web.ClientsHandler;
 import de.ids_mannheim.korap.web.SearchKrill;
 
@@ -62,7 +64,8 @@
     @SuppressWarnings("unchecked")
     public String serializeQuery (String q, String ql, String v, String cq,
             Integer pageIndex, Integer startPage, Integer pageLength,
-            String context, Boolean cutoff) throws KustvaktException {
+            String context, Boolean cutoff, boolean accessRewriteDisabled)
+            throws KustvaktException {
         QuerySerializer ss = new QuerySerializer().setQuery(q, ql, v);
         if (cq != null) ss.setCollection(cq);
 
@@ -88,38 +91,56 @@
         authenticationManager.setAccessAndLocation(user, headers);
         if (DEBUG) {
             if (user != null) {
-                jlog.debug("Debug: /getMatchInfo/: location="
-                        + user.locationtoString() + ", access="
-                        + user.accesstoString());
+                jlog.debug("Debug: user location=" + user.locationtoString()
+                        + ", access=" + user.accesstoString());
             }
         }
         return user;
     }
 
-    public String search (String jsonld) {
+    public String search (String jsonld, String username, HttpHeaders headers)
+            throws KustvaktException {
+
+        User user = createUser(username, headers);
+
+        JsonNode node  = JsonUtils.readTree(jsonld);
+        node = node.at("/meta/snippets");
+        if (node !=null && node.asBoolean()){
+            user.setCorpusAccess(CorpusAccess.ALL);
+        }
+        
+        String query = this.rewriteHandler.processQuery(jsonld, user);
         // MH: todo: should be possible to add the meta part to
         // the query serialization
         // User user = controller.getUser(ctx.getUsername());
         // jsonld = this.processor.processQuery(jsonld, user);
-        return searchKrill.search(jsonld);
+        return searchKrill.search(query);
     }
 
     @SuppressWarnings("unchecked")
     public String search (String engine, String username, HttpHeaders headers,
             String q, String ql, String v, String cq, String fields,
             Integer pageIndex, Integer pageInteger, String ctx,
-            Integer pageLength, Boolean cutoff) throws KustvaktException {
+            Integer pageLength, Boolean cutoff, boolean accessRewriteDisabled)
+            throws KustvaktException {
 
         KustvaktConfiguration.BACKENDS eng = this.config.chooseBackend(engine);
         User user = createUser(username, headers);
         CorpusAccess corpusAccess = user.getCorpusAccess();
         
+        // EM: TODO: check if requested fields are public metadata. Currently 
+        // it is not needed because all metadata are public.        
+        if (accessRewriteDisabled){
+            corpusAccess = CorpusAccess.ALL;
+            user.setCorpusAccess(CorpusAccess.ALL);
+        }
+            
         QuerySerializer serializer = new QuerySerializer();
         serializer.setQuery(q, ql, v);
         if (cq != null) serializer.setCollection(cq);
 
         MetaQueryBuilder meta = createMetaQuery(pageIndex, pageInteger, ctx,
-                pageLength, cutoff, corpusAccess, fields);
+                pageLength, cutoff, corpusAccess, fields, accessRewriteDisabled);
         serializer.setMeta(meta.raw());
 
         // There is an error in query processing
@@ -148,7 +169,8 @@
 
     private MetaQueryBuilder createMetaQuery (Integer pageIndex,
             Integer pageInteger, String ctx, Integer pageLength,
-            Boolean cutoff, CorpusAccess corpusAccess, String fields) {
+            Boolean cutoff, CorpusAccess corpusAccess, String fields,
+            boolean accessRewriteDisabled) {
         MetaQueryBuilder meta = new MetaQueryBuilder();
         meta.addEntry("startIndex", pageIndex);
         meta.addEntry("startPage", pageInteger);
@@ -156,6 +178,7 @@
         meta.addEntry("count", pageLength);
         // todo: what happened to cutoff?
         meta.addEntry("cutOff", cutoff);
+        meta.addEntry("snippets", !accessRewriteDisabled);
         // meta.addMeta(pageIndex, pageInteger, pageLength, ctx,
         // cutoff);
         // fixme: should only apply to CQL queries per default!
diff --git a/core/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java b/core/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java
index ef3b16b..8ccb8f1 100644
--- a/core/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java
+++ b/core/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java
@@ -6,6 +6,7 @@
 import java.util.Set;
 
 import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.FormParam;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
@@ -41,7 +42,7 @@
  * 
  * @author hanl, margaretha, diewald
  * @date 29/01/2014
- * @lastUpdate 09/07/2018
+ * @lastUpdate 05/07/2019
  * 
  */
 @Controller
@@ -77,31 +78,13 @@
     }
     
     
-    /**
-     * Builds a json query serialization from the given parameters.
-     * 
-     * @param locale
-     * @param securityContext
-     * @param q
-     *            query string
-     * @param ql
-     *            query language
-     * @param v
-     *            version
-     * @param context
-     * @param cutoff
-     *            true if the number of results should be limited
-     * @param pageLength
-     *            number of results per page
-     * @param pageIndex
-     * @param startPage
-     * @param cq
-     *            corpus query
-     * @return
-     */
-    // ref query parameter removed!
-    @GET
-    @Path("{version}/query")
+//     EM: This web service is DISABLED until there is a need for it.
+//     ND: In case rewrite is supported, it could be used to check the authorization 
+//         scope without searching etc. In case not, it helps to compare queries in 
+//         different query languages.
+//     MH: ref query parameter removed!
+//    @GET
+//    @Path("{version}/query")
     public Response serializeQuery (@Context Locale locale,
             @Context SecurityContext securityContext, @QueryParam("q") String q,
             @QueryParam("ql") String ql, @QueryParam("v") String v,
@@ -110,12 +93,14 @@
             @QueryParam("count") Integer pageLength,
             @QueryParam("offset") Integer pageIndex,
             @QueryParam("page") Integer startPage,
+            @QueryParam("access-rewrite-disabled") boolean accessRewriteDisabled,
             @QueryParam("cq") String cq) {
         TokenContext ctx = (TokenContext) securityContext.getUserPrincipal();
         try {
             scopeService.verifyScope(ctx, OAuth2Scope.SERIALIZE_QUERY);
             String result = searchService.serializeQuery(q, ql, v, cq,
-                    pageIndex, startPage, pageLength, context, cutoff);
+                    pageIndex, startPage, pageLength, context, cutoff,
+                    accessRewriteDisabled);
             if (DEBUG){
                 jlog.debug("Query: " + result);
             }
@@ -126,32 +111,35 @@
         }
     }
 
-    @POST
-    @Path("{version}/search")
+    
+//    This web service is DISABLED until there is a need for it. 
+//    @POST
+//    @Path("{version}/search")
     public Response searchPost (@Context SecurityContext context,
-            @Context Locale locale, @QueryParam("engine") String engine,
+            @Context Locale locale, 
+            @Context HttpHeaders headers,
             String jsonld) {
+        
+        if (DEBUG){
+            jlog.debug("Serialized search: " + jsonld);
+        }
+        
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
         try {
             scopeService.verifyScope(ctx, OAuth2Scope.SEARCH);
+            String result = searchService.search(jsonld, ctx.getUsername(),
+                    headers);
+            return Response.ok(result).build();
         }
         catch (KustvaktException e) {
             throw kustvaktResponseHandler.throwit(e);
         }
-
-        if (DEBUG){
-            jlog.debug("Serialized search: " + jsonld);
-        }
-        String result = searchService.search(jsonld);
-        if (DEBUG){
-            jlog.debug("The result set: " + result);
-        }
-        return Response.ok(result).build();
     }
 
     @GET
     @Path("{version}/search")
     public Response searchGet (@Context SecurityContext securityContext,
+            @Context HttpServletRequest request,
             @Context HttpHeaders headers, @Context Locale locale,
             @QueryParam("q") String q, @QueryParam("ql") String ql,
             @QueryParam("v") String v, @QueryParam("context") String ctx,
@@ -160,7 +148,9 @@
             @QueryParam("offset") Integer pageIndex,
             @QueryParam("page") Integer pageInteger,
             @QueryParam("fields") String fields,
-            @QueryParam("cq") String cq, @QueryParam("engine") String engine) {
+            @QueryParam("access-rewrite-disabled") boolean accessRewriteDisabled,
+            @QueryParam("cq") String cq, 
+            @QueryParam("engine") String engine) {
 
         TokenContext context =
                 (TokenContext) securityContext.getUserPrincipal();
@@ -170,7 +160,7 @@
             scopeService.verifyScope(context, OAuth2Scope.SEARCH);
             result = searchService.search(engine, context.getUsername(),
                     headers, q, ql, v, cq, fields, pageIndex, pageInteger, ctx,
-                    pageLength, cutoff);
+                    pageLength, cutoff, accessRewriteDisabled);
         }
         catch (KustvaktException e) {
             throw kustvaktResponseHandler.throwit(e);
@@ -257,8 +247,9 @@
         }
     }
 
-    @POST
-    @Path("{version}/colloc")
+//  EM: This web service requires Karang and is DISABLED.
+//    @POST
+//    @Path("{version}/colloc")
     public Response getCollocationBase (@QueryParam("q") String query) {
         String result;
         try {
diff --git a/full/Changes b/full/Changes
index 36a4c52..82ff399 100644
--- a/full/Changes
+++ b/full/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
 28/02/2019
    - Removed old VC controllers and updated tests (margaretha, issue #34)
diff --git a/full/pom.xml b/full/pom.xml
index ea825bc..87b0b74 100644
--- a/full/pom.xml
+++ b/full/pom.xml
@@ -3,7 +3,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>de.ids_mannheim.korap</groupId>
 	<artifactId>Kustvakt-full</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>
@@ -205,7 +205,7 @@
 		<dependency>
 			<groupId>de.ids_mannheim.korap</groupId>
 			<artifactId>Kustvakt-core</artifactId>
-			<version>[0.62,)</version>
+			<version>[0.62.1,)</version>
 		</dependency>
 		<!-- LDAP -->
 		<dependency>
diff --git a/full/src/main/resources/ehcache.xml b/full/src/main/resources/ehcache.xml
index 27a4b56..2531fdb 100644
--- a/full/src/main/resources/ehcache.xml
+++ b/full/src/main/resources/ehcache.xml
@@ -1,6 +1,7 @@
 <ehcache xsi:noNamespaceSchemaLocation="http://www.ehcache.org/ehcache.xsd"
 	updateCheck="true" monitoring="autodetect" dynamicConfig="true">
 	
+	<sizeOfPolicy maxDepth="100" maxDepthExceededBehavior="abort" />
     <defaultCache eternal='true' overflowToDisk='false'/>
     <!--maxBytesLocalHeap="200M"-->
     <diskStore path="./cache_store"/>
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/PublicMetadataTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/PublicMetadataTest.java
new file mode 100644
index 0000000..5412949
--- /dev/null
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/PublicMetadataTest.java
@@ -0,0 +1,133 @@
+package de.ids_mannheim.korap.web.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.google.common.net.HttpHeaders;
+import com.sun.jersey.api.client.ClientResponse;
+
+import de.ids_mannheim.korap.config.SpringJerseyTest;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.exceptions.StatusCodes;
+import de.ids_mannheim.korap.query.serialize.MetaQueryBuilder;
+import de.ids_mannheim.korap.query.serialize.QuerySerializer;
+import de.ids_mannheim.korap.utils.JsonUtils;
+
+public class PublicMetadataTest extends SpringJerseyTest {
+
+    @Test
+    public void testSearchPublicMetadata () throws KustvaktException {
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "Sonne").queryParam("ql", "poliqarp")
+                .queryParam("access-rewrite-disabled", "true")
+                .get(ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String entity = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(entity);
+        
+        assertEquals("availability(ALL)",
+                node.at("/collection/rewrites/0/scope").asText());
+
+        assertTrue(node.at("/matches/0/snippet").isMissingNode());
+    }
+
+    @Test
+    public void testSearchPublicMetadataExtern () throws KustvaktException {
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "Sonne").queryParam("ql", "poliqarp")
+                .queryParam("access-rewrite-disabled", "true")
+                .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
+                .get(ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String entity = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(entity);
+        
+        assertEquals("availability(ALL)",
+                node.at("/collection/rewrites/0/scope").asText());
+
+        assertTrue(node.at("/matches/0/snippet").isMissingNode());
+    }
+
+//  EM: The API is disabled
+    @Ignore
+    @Test
+    public void testSearchPostPublicMetadata () throws KustvaktException {
+        QuerySerializer s = new QuerySerializer();
+        s.setQuery("[orth=der]", "poliqarp");
+        s.setCollection("corpusSigle=GOE");
+        s.setQuery("Wasser", "poliqarp");
+        
+        MetaQueryBuilder meta = new MetaQueryBuilder();
+        meta.addEntry("snippets", "true");
+        s.setMeta(meta);
+        
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .post(ClientResponse.class, s.toJSON());
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String ent = response.getEntity(String.class);
+
+        JsonNode node = JsonUtils.readTree(ent);
+        assertEquals("availability(ALL)",
+                node.at("/collection/rewrites/0/scope").asText());
+        assertTrue(node.at("/matches/0/snippet").isMissingNode());
+    }
+    
+    @Test
+    public void testSearchPublicMetadataWithSystemVC ()
+            throws KustvaktException {
+
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "Sonne").queryParam("ql", "poliqarp")
+                .queryParam("cq", "referTo system-vc")
+                .queryParam("access-rewrite-disabled", "true")
+                .get(ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String entity = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(entity);
+
+        assertEquals("operation:and",
+                node.at("/collection/operation").asText());
+        node = node.at("/collection/operands/1");
+        assertEquals("koral:doc", node.at("/@type").asText());
+        assertEquals("GOE", node.at("/value").asText());
+        assertEquals("match:eq", node.at("/match").asText());
+        assertEquals("corpusSigle", node.at("/key").asText());
+
+        assertEquals("operation:deletion",
+                node.at("/rewrites/0/operation").asText());
+        assertEquals("@type(koral:docGroupRef)",
+                node.at("/rewrites/0/scope").asText());
+
+        assertEquals("operation:deletion",
+                node.at("/rewrites/1/operation").asText());
+        assertEquals("ref(system-vc)", node.at("/rewrites/1/scope").asText());
+
+        assertEquals("operation:insertion",
+                node.at("/rewrites/2/operation").asText());
+    }
+
+    @Test
+    public void testSearchPublicMetadataWithPrivateVC ()
+            throws KustvaktException {
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "Sonne").queryParam("ql", "poliqarp")
+                .queryParam("cq", "referTo \"dory/dory-vc\"")
+                .queryParam("access-rewrite-disabled", "true")
+                .get(ClientResponse.class);
+
+        String entity = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(entity);
+
+        assertEquals(StatusCodes.AUTHORIZATION_FAILED,
+                node.at("/errors/0/0").asInt());
+        assertEquals("guest", node.at("/errors/0/2").asText());
+    }
+}
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/QuerySerializationControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/QuerySerializationControllerTest.java
index 483a059..cd35e86 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/QuerySerializationControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/QuerySerializationControllerTest.java
@@ -24,8 +24,8 @@
 import de.ids_mannheim.korap.utils.JsonUtils;
 import de.ids_mannheim.korap.web.FastJerseyTest;
 
-/* EM: potentially an unused service! */
 
+// EM: The API is disabled
 @Ignore
 public class QuerySerializationControllerTest extends FastJerseyTest {
 
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/SearchControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/SearchControllerTest.java
index 1fb3915..33b6729 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/SearchControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/SearchControllerTest.java
@@ -42,6 +42,14 @@
         return node;
     }
     
+    private String createJsonQuery(){
+        QuerySerializer s = new QuerySerializer();
+        s.setQuery("[orth=der]", "poliqarp");
+        s.setCollection("corpusSigle=GOE");
+        s.setQuery("Wasser", "poliqarp");
+        return s.toJSON();
+    }
+    
     @Test
     public void testSearchWithField () throws KustvaktException {
         JsonNode node = requestSearchWithFields("author");
@@ -296,6 +304,8 @@
         assertNotEquals("${project.version}", "/meta/version");
     }
 
+//  EM: The API is disabled
+    @Ignore
     @Test
     public void testSearchSimpleCQL () throws KustvaktException {
         QuerySerializer s = new QuerySerializer();
@@ -313,16 +323,12 @@
         // assertEquals(17027, node.at("/meta/totalResults").asInt());
     }
 
+//  EM: The API is disabled
     @Test
+    @Ignore
     public void testSearchRawQuery () throws KustvaktException {
-        QuerySerializer s = new QuerySerializer();
-        s.setQuery("[orth=der]", "poliqarp");
-        s.setCollection("corpusSigle=GOE");
-
-        s.setQuery("Wasser", "poliqarp");
-        // System.out.println(s.toJSON());
         ClientResponse response = resource().path(API_VERSION).path("search")
-                .post(ClientResponse.class, s.toJSON());
+                .post(ClientResponse.class, createJsonQuery());
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
         String ent = response.getEntity(String.class);
@@ -330,6 +336,54 @@
         JsonNode node = JsonUtils.readTree(ent);
         assertNotNull(node);
         assertNotEquals(0, node.path("matches").size());
-        // assertEquals(10993, node.at("/meta/totalResults").asInt());
+        
+        assertEquals("availability(FREE)",
+                node.at("/collection/rewrites/0/scope").asText());
+    }
+    
+//  EM: The API is disabled    
+    @Test
+    @Ignore
+    public void testSearchPostAll () throws KustvaktException {
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .header(HttpHeaders.X_FORWARDED_FOR, "10.27.0.32")
+                .header(Attributes.AUTHORIZATION,
+                        HttpAuthorizationHandler
+                                .createBasicAuthorizationHeaderValue("kustvakt",
+                                        "kustvakt2015"))
+                .post(ClientResponse.class, createJsonQuery());
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String ent = response.getEntity(String.class);
+
+        JsonNode node = JsonUtils.readTree(ent);
+        assertNotNull(node);
+        assertNotEquals(0, node.path("matches").size());
+        
+        assertEquals("availability(ALL)",
+                node.at("/collection/rewrites/0/scope").asText());
+    }
+    
+//  EM: The API is disabled
+    @Test
+    @Ignore
+    public void testSearchPostPublic () throws KustvaktException {
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
+                .header(Attributes.AUTHORIZATION,
+                        HttpAuthorizationHandler
+                                .createBasicAuthorizationHeaderValue("kustvakt",
+                                        "kustvakt2015"))
+                .post(ClientResponse.class, createJsonQuery());
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String ent = response.getEntity(String.class);
+
+        JsonNode node = JsonUtils.readTree(ent);
+        assertNotNull(node);
+        assertNotEquals(0, node.path("matches").size());
+        
+        assertEquals("availability(PUB)",
+                node.at("/collection/rewrites/0/scope").asText());
     }
 }
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());
