Adopted more legacy tests and removed search API from collections

Change-Id: I30d544b3f09b2b4971e2c39e793894498a62778e
diff --git a/src/test/resources/queries/bsp-context-2.jsonld b/src/test/resources/queries/bsp-context-2.jsonld
index 481ab44..ddefd0e 100644
--- a/src/test/resources/queries/bsp-context-2.jsonld
+++ b/src/test/resources/queries/bsp-context-2.jsonld
@@ -1,29 +1,36 @@
 {
-    "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
-    "query":{
-	"@type":"koral:token",
-	"wrap":{
-	    "@type":"koral:term",
-	    "foundry" : "mate",
-	    "layer":"l",
-	    "key":"wert",
-	    "match":"match:eq"
-	}
-    },
-    "collections":[
-	{
-	    "@type":"koral:meta-filter",
-	    "@value":{
-		"@type":"koral:term",
-		"@field":"koral:field#corpusID",
-		"@value":"WPD"
-	    }
-	}
-    ],
-    "meta":{
-	"startPage":1,
-	"count":25,
-	"context":{"left":["char",210],"right":["char",210]},
-	"cutOff":true
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+  "query":{
+    "@type":"koral:token",
+    "wrap":{
+      "@type":"koral:term",
+      "foundry" : "mate",
+      "layer":"l",
+      "key":"wert",
+      "match":"match:eq"
     }
+  },
+  "collection" : {
+    "@type": "koral:doc",
+    "key": "corpusID",
+    "match": "match:eq",
+    "value": "WPD",
+    "type": "type:string"
+  },
+  "collections":[
+    {
+      "@type":"koral:meta-filter",
+      "@value":{
+	"@type":"koral:term",
+	"@field":"koral:field#corpusID",
+	"@value":"WPD"
+      }
+    }
+  ],
+  "meta":{
+    "startPage":1,
+    "count":25,
+    "context":{"left":["char",210],"right":["char",210]},
+    "cutOff":true
+  }
 }
diff --git a/src/test/resources/queries/bsp-context-sentence.jsonld b/src/test/resources/queries/bsp-context-sentence.jsonld
index 28488b3..3ba2e94 100644
--- a/src/test/resources/queries/bsp-context-sentence.jsonld
+++ b/src/test/resources/queries/bsp-context-sentence.jsonld
@@ -10,6 +10,13 @@
 	    "match":"match:eq"
 	}
     },
+  "collection" : {
+    "@type": "koral:doc",
+    "key": "corpusID",
+    "match": "match:eq",
+    "value": "WPD",
+    "type": "type:string"
+  },     
     "collections":[
 	{
 	    "@type":"koral:meta-filter",
diff --git a/src/test/resources/queries/bugs/multiterm_rewrite.jsonld b/src/test/resources/queries/bugs/multiterm_rewrite.jsonld
index 3ea96ea..e42d555 100644
--- a/src/test/resources/queries/bugs/multiterm_rewrite.jsonld
+++ b/src/test/resources/queries/bugs/multiterm_rewrite.jsonld
@@ -50,6 +50,13 @@
       }
     ]
   },
+  "collection" : {
+    "@type": "koral:doc",
+    "key": "corpusID",
+    "match": "match:eq",
+    "value": "WPD",
+    "type": "type:string"
+  },     
   "collections":[
     {
       "@type":"koral:meta-filter",
diff --git a/src/test/resources/queries/metaquery4.jsonld b/src/test/resources/queries/metaquery4.jsonld
index 0b6c263..3673d69 100644
--- a/src/test/resources/queries/metaquery4.jsonld
+++ b/src/test/resources/queries/metaquery4.jsonld
@@ -18,6 +18,26 @@
       "match":"match:eq"
     }
   },
+  "collection" : {
+    "@type": "koral:docGroup",
+    "operation": "operation:and",
+    "operands": [
+      {
+	"@type": "koral:doc",
+	"key": "pubDate",
+	"match": "match:geq",
+	"value": "2000-01-01",
+	"type": "type:date"
+      },
+      {
+	"@type": "koral:doc",
+	"key": "pubDate",
+	"match": "match:leq",
+	"value": "2013-12-31",
+	"type": "type:date"
+      }
+    ]
+  },
   "collections": [
     {
       "@type": "koral:meta-filter",
diff --git a/src/test/resources/queries/metaquery5.jsonld b/src/test/resources/queries/metaquery5.jsonld
index 06141c3..2d2ccd4 100644
--- a/src/test/resources/queries/metaquery5.jsonld
+++ b/src/test/resources/queries/metaquery5.jsonld
@@ -18,6 +18,32 @@
       "match":"match:eq"
     }
   },
+  "collection" : {
+    "@type": "koral:docGroup",
+    "operation": "operation:and",
+    "operands": [
+      {
+	"@type": "koral:docGroup",
+	"operation": "operation:and",
+	"operands": [
+	  {
+	    "@type": "koral:doc",
+	    "key": "pubDate",
+	    "match": "match:geq",
+	    "value": "2000-01-01",
+	    "type": "type:date"
+	  },
+	  {
+	    "@type": "koral:doc",
+	    "key": "pubDate",
+	    "match": "match:leq",
+	    "value": "2013-12-31",
+	    "type": "type:date"
+	  }
+	]
+      }
+    ]
+  },
   "collections": [
     {
       "@type": "koral:meta-filter",
diff --git a/src/test/resources/queries/metaquery6.jsonld b/src/test/resources/queries/metaquery6.jsonld
index 2d4b8e1..4abcd6f 100644
--- a/src/test/resources/queries/metaquery6.jsonld
+++ b/src/test/resources/queries/metaquery6.jsonld
@@ -17,6 +17,32 @@
       "key":"lediglich"
     }
   },
+  "collection" : {
+    "@type": "koral:docGroup",
+    "operation": "operation:and",
+    "operands": [
+      {
+	"@type": "koral:docGroup",
+	"operation": "operation:and",
+	"operands": [
+	  {
+	    "@type": "koral:doc",
+	    "key": "pubDate",
+	    "match": "match:geq",
+	    "value": "2005-01-01",
+	    "type": "type:date"
+	  },
+	  {
+	    "@type": "koral:doc",
+	    "key": "pubDate",
+	    "match": "match:leq",
+	    "value": "2013-12-31",
+	    "type": "type:date"
+	  }
+	]
+      }
+    ]
+  },
   "collections": [
     {
       "@type": "koral:meta-filter",
diff --git a/src/test/resources/queries/metas/fields.jsonld b/src/test/resources/queries/metas/fields.jsonld
index 845f3f8..7bac417 100644
--- a/src/test/resources/queries/metas/fields.jsonld
+++ b/src/test/resources/queries/metas/fields.jsonld
@@ -1,6 +1,13 @@
 {
   "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.2/context.jsonld",
   "announcements" : [],
+  "collection" : {
+    "@type": "koral:doc",
+    "key": "corpusID",
+    "match": "match:eq",
+    "value": "WPD",
+    "type": "type:string"
+  },     
   "collections" : [
     {
       "@type" : "koral:meta-filter",
diff --git a/src/test/resources/queries/metas/fields_2.jsonld b/src/test/resources/queries/metas/fields_2.jsonld
index 02c2474..fa10af4 100644
--- a/src/test/resources/queries/metas/fields_2.jsonld
+++ b/src/test/resources/queries/metas/fields_2.jsonld
@@ -1,6 +1,14 @@
 {
   "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.2/context.jsonld",
   "announcements" : [],
+  "collection" : {
+    "@type": "koral:doc",
+    "key": "corpusID",
+    "match": "match:eq",
+    "value": "WPD",
+    "type": "type:string"
+  },     
+
   "collections" : [
     {
       "@type" : "koral:meta-filter",