Warn on use of operation:merge

Change-Id: Ib3764ebcff3222aa0bd18e28e6c3e1ff862bb170
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
index af53472..34fb3f1 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
@@ -601,18 +601,20 @@
 
 
     @Test
-    public void queryJSONregexRewrite2 () throws QueryException {
-        // "der" [.*] [.*?] [.+] [.+?]
+    public void queryJSONmerge () throws QueryException {
+        // treat merging gracefully
         String json = getString(getClass()
-                .getResource("/queries/sequence/regex-rewrite-2.jsonld")
+                .getResource("/queries/merge.jsonld")
                 .getFile());
         KrillQuery kq = new KrillQuery("tokens");
-
         assertEquals(kq.fromKoral(json).toQuery().toString(),
-                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:der, []{4, 4}, right)}))");
+                "spanNext(tokens:s:der, tokens:s:Baum)");
+		assertEquals(kq.getWarning(0).getCode(), 774);
     };
 
 
+	
+
     public static String getString (String path) {
         StringBuilder contentBuilder = new StringBuilder();
         try {
diff --git a/src/test/resources/queries/merge.jsonld b/src/test/resources/queries/merge.jsonld
new file mode 100644
index 0000000..9b50760
--- /dev/null
+++ b/src/test/resources/queries/merge.jsonld
@@ -0,0 +1,34 @@
+{
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.2/context.jsonld",
+  "query": {
+    "@type": "koral:group",
+    "operation":"operation:merge",
+    "operands": [
+      {
+        "@type": "koral:group",
+        "operation": "operation:sequence",
+        "inOrder": true,
+        "operands": [
+          {
+            "@type": "koral:token",
+            "wrap": {
+              "match": "match:eq",
+              "layer": "orth",
+              "key": "der",
+              "@type": "koral:term"
+            }
+          },
+          {
+            "wrap": {
+              "match": "match:eq",
+              "layer": "orth",
+              "key": "Baum",
+              "@type": "koral:term"
+            },
+            "@type": "koral:token"
+          }
+        ]
+      }
+    ]
+  }
+}