diff --git a/full/Changes b/full/Changes
index a1fd961..14a3e5e 100644
--- a/full/Changes
+++ b/full/Changes
@@ -10,7 +10,9 @@
    - Added metadata controller tests (margaretha)
 18/02/2019
    - Fixed tests (margaretha)
-   - Updated handling errors from Koral (margaretha)  
+   - Updated handling errors from Koral (margaretha)
+19/02/2019
+   - Added fields to metadata controller (margaretha, issue #39)
 
 # version 0.61.5
 17/12/2018
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/MetadataControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/MetadataControllerTest.java
index 71a3fff..661cad1 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/MetadataControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/MetadataControllerTest.java
@@ -3,6 +3,7 @@
 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;
@@ -19,11 +20,41 @@
 public class MetadataControllerTest extends SpringJerseyTest {
 
     @Test
+    public void testRetrieveMetadataWithField () throws KustvaktException {
+        ClientResponse response = resource().path(API_VERSION).path("corpus")
+                .path("GOE").path("AGA").path("01784")
+                .queryParam("fields", "author").get(ClientResponse.class);
+
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String entity = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(entity);
+
+        assertEquals("author", node.at("/document/fields/0/key").asText());
+    }
+    
+
+    @Test
+    public void testRetrieveMetadataWithMultipleFields () throws KustvaktException {
+        ClientResponse response = resource().path(API_VERSION).path("corpus")
+                .path("GOE").path("AGA").path("01784")
+                .queryParam("fields", "author,title").get(ClientResponse.class);
+
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String entity = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(entity);
+
+        assertEquals("author", node.at("/document/fields/0/key").asText());
+        assertEquals("title", node.at("/document/fields/1/key").asText());
+    }    
+    
+    @Test
     public void testFreeMetadata () throws KustvaktException {
 
         ClientResponse response = resource().path(API_VERSION).path("corpus")
                 .path("GOE").path("AGA").path("01784")
-                .queryParam("foundry", "*").get(ClientResponse.class);
+                .get(ClientResponse.class);
 
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -34,12 +65,14 @@
 
     }
 
+    // EM: currently all metadata are allowed
     @Test
+    @Ignore
     public void testMetadataUnauthorized () throws KustvaktException {
 
         ClientResponse response = resource().path(API_VERSION).path("corpus")
                 .path("GOE").path("AGI").path("04846")
-                .queryParam("foundry", "*").get(ClientResponse.class);
+                .get(ClientResponse.class);
 
         assertEquals(ClientResponse.Status.UNAUTHORIZED.getStatusCode(),
                 response.getStatus());
@@ -84,7 +117,9 @@
                 response.getStatus());
     }
 
+    // EM: currently all metadata are allowed
     @Test
+    @Ignore
     public void testMetadataAvailabilityAllUnauthorized ()
             throws KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("corpus")
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 fd33b90..0a62f9d 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
@@ -23,12 +23,42 @@
 import de.ids_mannheim.korap.utils.JsonUtils;
 
 /**
- * @author margaretha, hanl
- * @lastUpdate 22/03/2018
+ * @author hanl, margaretha
+ * @lastUpdate 18/02/2019
  *
  */
 public class SearchControllerTest extends SpringJerseyTest {
 
+    
+    private JsonNode requestSearchWithFields(String fields) throws KustvaktException{
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "[orth=das]").queryParam("ql", "poliqarp")
+                .queryParam("fields", fields)
+                .queryParam("context", "sentence").queryParam("count", "13")
+                .get(ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String query = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(query);
+        return node;
+    }
+    
+    @Test
+    public void testSearchWithField () throws KustvaktException {
+        JsonNode node = requestSearchWithFields("author");
+        assertNotEquals(0, node.at("/matches").size());
+        assertEquals("[\"author\"]",
+                node.at("/meta/fields").toString());
+    }
+    
+    @Test
+    public void testSearchWithMultipleFields () throws KustvaktException {
+        JsonNode node = requestSearchWithFields("author, title");
+        assertNotEquals(0, node.at("/matches").size());
+        assertEquals("[\"author\",\"title\"]",
+                node.at("/meta/fields").toString());
+    }
+    
     @Test
     public void testSearchQueryPublicCorpora () throws KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("search")
