diff --git a/full/Changes b/full/Changes
index 13707b8..b58f77a 100644
--- a/full/Changes
+++ b/full/Changes
@@ -5,6 +5,7 @@
 - Fixed errors due to missing query type and added tests.
 2021-08-13
 - Fixed missing request entity.
+- Updated the query service to enable editing query references.
 
 # version 0.63.2
 2021-06-11
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/QueryDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/QueryDao.java
index 9fa399c..c8ae459 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/QueryDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/QueryDao.java
@@ -76,34 +76,40 @@
         return q.getId();
     }
 
-    public void editQuery (QueryDO query, String name,
-            ResourceType type, CorpusAccess requiredAccess, String koralQuery,
-            String definition, String description, String status,
-            boolean isCached) throws KustvaktException {
+    public void editQuery (QueryDO queryDO, String name, ResourceType type,
+            CorpusAccess requiredAccess, String koralQuery, String definition,
+            String description, String status, boolean isCached,
+            String queryStr, String queryLanguage) throws KustvaktException {
 
         if (name != null && !name.isEmpty()) {
-            query.setName(name);
+            queryDO.setName(name);
         }
         if (type != null) {
-            query.setType(type);
+            queryDO.setType(type);
         }
         if (requiredAccess != null) {
-            query.setRequiredAccess(requiredAccess);
+            queryDO.setRequiredAccess(requiredAccess);
         }
         if (koralQuery != null) {
-            query.setKoralQuery(koralQuery);
+            queryDO.setKoralQuery(koralQuery);
         }
         if (definition != null && !definition.isEmpty()) {
-            query.setDefinition(definition);
+            queryDO.setDefinition(definition);
         }
         if (description != null && !description.isEmpty()) {
-            query.setDescription(description);
+            queryDO.setDescription(description);
         }
         if (status != null && !status.isEmpty()) {
-            query.setStatus(status);
+            queryDO.setStatus(status);
         }
-        query.setCached(isCached);
-        entityManager.merge(query);
+        if(queryStr!=null && !queryStr.isEmpty()) {
+            queryDO.setQuery(queryStr);
+        }
+        if(queryLanguage!=null && !queryLanguage.isEmpty()) {
+            queryDO.setQueryLanguage(queryLanguage);
+        }
+        queryDO.setCached(isCached);
+        entityManager.merge(queryDO);
     }
 
     public void deleteQuery (QueryDO query)
diff --git a/full/src/main/java/de/ids_mannheim/korap/service/QueryService.java b/full/src/main/java/de/ids_mannheim/korap/service/QueryService.java
index c8961934..f54dd92 100644
--- a/full/src/main/java/de/ids_mannheim/korap/service/QueryService.java
+++ b/full/src/main/java/de/ids_mannheim/korap/service/QueryService.java
@@ -227,11 +227,17 @@
         String koralQuery = null;
         CorpusAccess requiredAccess = null;
         String corpusQuery = newQuery.getCorpusQuery();
+        String query = newQuery.getQuery();
+        String queryLanguage = newQuery.getQueryLanguage();
         if (corpusQuery != null && !corpusQuery.isEmpty()) {
             koralQuery = serializeCorpusQuery(corpusQuery);
             requiredAccess = determineRequiredAccess(newQuery.isCached(), queryName,
                     koralQuery);
         }
+        else if (query != null && !query.isEmpty() && queryLanguage != null
+                && !queryLanguage.isEmpty()) {
+            koralQuery = serializeQuery(query, queryLanguage);
+        }
 
         ResourceType type = newQuery.getType();
         if (type != null) {
@@ -256,7 +262,7 @@
 
         queryDao.editQuery(existingQuery, queryName, type, requiredAccess,
                 koralQuery, newQuery.getDefinition(), newQuery.getDescription(),
-                newQuery.getStatus(), newQuery.isCached());
+                newQuery.getStatus(), newQuery.isCached(), query, queryLanguage);
     }
 
     private void publishQuery (int queryId) throws KustvaktException {
@@ -471,7 +477,7 @@
             }
 
             queryDao.editQuery(query, null, ResourceType.PROJECT, null, null,
-                    null, null, null, query.isCached());
+                    null, null, null, query.isCached(), null, null);
         }
     }
 
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/QueryReferenceControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/QueryReferenceControllerTest.java
index 0637b0c..260d796 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/QueryReferenceControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/QueryReferenceControllerTest.java
@@ -26,17 +26,16 @@
     private String testUser = "qRefControllerTest";
     private String adminUser = "admin";
 
-    private void checkAndDeleteQuery (JsonNode node, String qName, String query,
+    private void checkQuery (String qName, String query,
             String username, ResourceType resourceType, CorpusAccess access)
             throws KustvaktException {
+        JsonNode node = testRetrieveQueryByName(username, username, qName);
         assertEquals(qName, node.at("/name").asText());
         assertEquals(resourceType.displayName(), node.at("/type").asText());
         assertEquals(username, node.at("/createdBy").asText());
         assertEquals(query, node.at("/query").asText());
         assertEquals("poliqarp", node.at("/queryLanguage").asText());
         assertEquals(access.name(), node.at("/requiredAccess").asText());
-
-        testDeleteQueryByName(qName, username);
     }
     
     @Test
@@ -56,12 +55,36 @@
 
         assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
 
-        JsonNode node = testRetrieveQueryByName(testUser, testUser, qName);
-        checkAndDeleteQuery(node, qName, "der", testUser, ResourceType.PRIVATE,
+        checkQuery(qName, "der", testUser, ResourceType.PRIVATE,
                 CorpusAccess.PUB);
+        testDeleteQueryByName(qName, testUser);
     }
 
     @Test
+    public void testCreatePublishQuery () throws KustvaktException {
+        String json = "{\"type\": \"PUBLISHED\"" 
+                + ",\"queryType\": \"QUERY\""
+                + ",\"queryLanguage\": \"poliqarp\"" 
+                + ",\"query\": \"Regen\"}";
+
+        String qName = "publish_query";
+        ClientResponse response = resource().path(API_VERSION).path("query")
+                .path("~" + testUser).path(qName)
+                .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
+                        .createBasicAuthorizationHeaderValue(testUser, "pass"))
+                .header(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON)
+                .put(ClientResponse.class, json);
+
+        assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
+
+        checkQuery(qName, "Regen", testUser, ResourceType.PUBLISHED,
+                CorpusAccess.PUB);
+        testDeleteQueryByName(qName, testUser);
+        // check if hidden group has been created
+        
+    }
+    
+    @Test
     public void testCreateUserQueryByAdmin () throws KustvaktException {
         String json = "{\"type\": \"PRIVATE\""
                 + ",\"queryType\": \"QUERY\""
@@ -96,9 +119,30 @@
                 .entity(json).put(ClientResponse.class);
 
         assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
-        testDeleteQueryByName(qName, "admin");
+        
+        checkQuery(qName, "Sommer", adminUser, ResourceType.SYSTEM, CorpusAccess.PUB);
+        testUpdateQuery(qName);
     }
     
+    private void testUpdateQuery (String qName)
+            throws UniformInterfaceException, ClientHandlerException,
+            KustvaktException {
+        String json = "{\"query\": \"Sonne\""
+                + ",\"queryLanguage\": \"poliqarp\"}";
+        
+        ClientResponse response = resource().path(API_VERSION).path("query")
+                .path("~admin").path(qName)
+                .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
+                        .createBasicAuthorizationHeaderValue(adminUser, "pass"))
+                .header(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON)
+                .entity(json).put(ClientResponse.class);
+        
+        assertEquals(Status.NO_CONTENT.getStatusCode(), response.getStatus());
+        
+        checkQuery(qName, "Sonne", adminUser, ResourceType.SYSTEM, CorpusAccess.PUB);
+        testDeleteQueryByName(qName, adminUser);
+    }
+
     @Test
     public void testCreateSystemQueryUnauthorized () throws KustvaktException {
         String json = "{\"type\": \"SYSTEM\""
@@ -139,9 +183,9 @@
 
         assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
 
-        JsonNode node = testRetrieveQueryByName(testUser, testUser, qName);
-        checkAndDeleteQuery(node, qName, "Sohn", testUser, ResourceType.PRIVATE,
+        checkQuery(qName, "Sohn", testUser, ResourceType.PRIVATE,
                 CorpusAccess.PUB);
+        testDeleteQueryByName(qName, testUser);
     }
     
     @Test
