diff --git a/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java b/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
index dc16ccf..f1a4e12 100644
--- a/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
+++ b/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
@@ -9,6 +9,7 @@
 import com.fasterxml.jackson.annotation.*;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.TextField;
@@ -38,8 +39,8 @@
 public class FieldDocument extends AbstractDocument {
     ObjectMapper mapper = new ObjectMapper();
 
+    @JsonIgnore
     public Document doc = new Document();
-
     private FieldType tvField = new FieldType(TextField.TYPE_STORED);
     private FieldType tvNoField = new FieldType(TextField.TYPE_NOT_STORED);
     private FieldType keywords = new FieldType(TextField.TYPE_STORED);
diff --git a/src/main/java/de/ids_mannheim/korap/response/Response.java b/src/main/java/de/ids_mannheim/korap/response/Response.java
index a1f72a4..2dc6516 100644
--- a/src/main/java/de/ids_mannheim/korap/response/Response.java
+++ b/src/main/java/de/ids_mannheim/korap/response/Response.java
@@ -49,7 +49,10 @@
     private String benchmark;
     private boolean timeExceeded = false;
 
-    private static final String KORAL_VERSION = "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld";
+    private HashMap<String, ObjectNode> jsonFields;
+
+    private static final String KORAL_VERSION =
+        "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld";
 
 
     /**
@@ -441,6 +444,12 @@
         return (Response) this.moveNotificationsFrom(meta);
     };
 
+    public void addJsonNode (String key, ObjectNode value) {
+        if (this.jsonFields == null)
+            this.jsonFields = new HashMap<String, ObjectNode>(4);
+        this.jsonFields.put(key, value);
+    };
+
 
     /**
      * Serialize response as a {@link JsonNode}.
@@ -500,6 +509,11 @@
         if (this.totalResults != -2)
             meta.put("totalResults", this.totalResults);
 
+        // Add json fields as passed to the object
+        if (this.jsonFields != null) {
+            json.putAll(this.jsonFields);
+        };
+
         // KoralQuery query object
         if (this.query != null) {
             JsonNode queryNode = this.getQuery().toJsonNode();
diff --git a/src/main/java/de/ids_mannheim/korap/server/Resource.java b/src/main/java/de/ids_mannheim/korap/server/Resource.java
index 83f69b5..993fec3 100644
--- a/src/main/java/de/ids_mannheim/korap/server/Resource.java
+++ b/src/main/java/de/ids_mannheim/korap/server/Resource.java
@@ -43,6 +43,7 @@
 import java.sql.SQLException;
 import com.mchange.v2.c3p0.ComboPooledDataSource;
 
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 /**
  * Root resource (exposed at root path) of the Krill node.
@@ -136,6 +137,9 @@
         kresp.addMessage(681, "Document was added successfully",
                 fd.getID() != null ? fd.getID() : "Unknown");
 
+        // Mirror meta data
+        kresp.addJsonNode("text", (ObjectNode) fd.toJsonNode());
+
         return kresp.toJsonString();
     };
 
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
index 00b9874..b48b48e 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
@@ -201,6 +201,7 @@
             FieldDocument fd = ki.addDoc(
                     getClass().getResourceAsStream("/wiki/" + i + ".json.gz"),
                     true);
+
         };
         ki.commit();
 
diff --git a/src/test/java/de/ids_mannheim/korap/response/TestResponse.java b/src/test/java/de/ids_mannheim/korap/response/TestResponse.java
index 1ab89fe..43222c7 100644
--- a/src/test/java/de/ids_mannheim/korap/response/TestResponse.java
+++ b/src/test/java/de/ids_mannheim/korap/response/TestResponse.java
@@ -8,6 +8,7 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import static org.junit.Assert.*;
 import org.junit.Test;
@@ -169,4 +170,18 @@
         assertEquals("tanja", kresp.getNode());
         assertTrue(kresp.hasTimeExceeded());
     };
+
+    @Test
+    public void testResponseJSONadd () throws IOException {
+        Response resp = new Response();
+        ObjectNode jNode = mapper.createObjectNode();
+        jNode.put("Hui", "works");
+        resp.addJsonNode("test", jNode);
+        JsonNode respJson = mapper.readTree(resp.toJsonString());
+
+        assertEquals(
+                "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld",
+                respJson.at("/@context").asText());
+        assertEquals("works", respJson.at("/test/Hui").asText());
+    };
 };
diff --git a/src/test/java/de/ids_mannheim/korap/server/TestResource.java b/src/test/java/de/ids_mannheim/korap/server/TestResource.java
index b04490e..966d6e7 100644
--- a/src/test/java/de/ids_mannheim/korap/server/TestResource.java
+++ b/src/test/java/de/ids_mannheim/korap/server/TestResource.java
@@ -115,7 +115,7 @@
         JsonNode res;
 
         for (String i : new String[] { "00001", "00002", "00003", "00004",
-                "00005", "00006", "02439" }) {
+                "00005", "00006" }) {
 
             String json = StringfromFile(getClass().getResource(
                     "/wiki/" + i + ".json").getFile());
@@ -129,7 +129,6 @@
 
                 res = mapper.readTree(resp);
                 assertEquals("milena", res.at("/meta/node").asText());
-                // System.err.println(res.toString());
             }
             catch (Exception e) {
                 fail("Server response failed " + e.getMessage()
@@ -137,6 +136,25 @@
             }
         };
 
+        String json = StringfromFile(getClass().getResource("/wiki/02439.json").getFile());
+        Entity jsonE = Entity.json(json);
+
+        try {
+            // Put new documents to the index
+            resp = target.path("/index/02439").request("application/json")
+                .put(jsonE, String.class);
+
+            res = mapper.readTree(resp);
+
+            // Check mirroring
+            assertEquals(2439, res.at("/text/UID").asInt());
+            assertEquals("milena", res.at("/meta/node").asText());
+        }
+        catch (Exception e) {
+            fail("Server response failed " + e.getMessage()
+                 + " (Known issue)");
+        };
+
         // Commit!
         resp = target.path("/index").request("application/json")
                 .post(Entity.text(""), String.class);
@@ -145,7 +163,6 @@
         assertEquals(683, res.at("/messages/0/0").asInt());
     };
 
-
     @Test
     public void testCollection () throws IOException {
 
