diff --git a/src/main/java/de/ids_mannheim/korap/KorapCollection.java b/src/main/java/de/ids_mannheim/korap/KorapCollection.java
index 6c33c7c..1f65da2 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapCollection.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapCollection.java
@@ -11,6 +11,7 @@
 import de.ids_mannheim.korap.KorapFilter;
 
 import de.ids_mannheim.korap.util.KorapDate;
+import de.ids_mannheim.korap.util.QueryException;
 import de.ids_mannheim.korap.filter.BooleanFilter;
 import de.ids_mannheim.korap.filter.FilterOperation;
 import org.apache.lucene.search.spans.SpanQuery;
@@ -58,6 +59,7 @@
 	try {
 	    JsonNode json = mapper.readValue(jsonString, JsonNode.class);
 	    if (json.has("meta")) {
+		log.trace("Add meta collection");
 		for (JsonNode meta : json.get("meta")) {
 		    this.fromJSON(meta);
 		};
@@ -72,13 +74,15 @@
 	this.filter = new ArrayList<FilterOperation>(5);
     };
 
-    public void fromJSON(JsonNode json) {
+    public void fromJSON(JsonNode json) throws QueryException {
 	String type = json.get("@type").asText();
 
 	if (type.equals("korap:meta-filter")) {
+	    log.trace("Add Filter");
 	    this.filter(new BooleanFilter(json.get("@value")));
 	}
 	else if (type.equals("korap:meta-extend")) {
+	    log.trace("Add Extend");
 	    this.extend(new BooleanFilter(json.get("@value")));
 	};
     };
@@ -134,6 +138,14 @@
     };
 
 
+    public String toString () {
+	StringBuffer sb = new StringBuffer();
+	for (FilterOperation fo : this.filter) {
+	    sb.append(fo.toString()).append("; ");
+	};
+	return sb.toString();
+    };
+
     // DEPRECATED BUT USED IN TEST CASES
     public KorapResult search (SpanQuery query) {
 	return this.index.search(this, query, 0, (short) 20, true, (short) 5, true, (short) 5);
@@ -231,5 +243,9 @@
 	return this.index.numberOf(this, "tokens", type);
     };
 
+    public String getError () {
+	return this.error;
+    };
+
     // implement "till" with rangefilter
 };
diff --git a/src/main/java/de/ids_mannheim/korap/KorapSearch.java b/src/main/java/de/ids_mannheim/korap/KorapSearch.java
index 8733a38..4f55dd0 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapSearch.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapSearch.java
@@ -252,6 +252,8 @@
 
     public KorapSearch setCollection (KorapCollection kc) {
 	this.collection = kc;
+	if (kc.getError() != null)
+	    this.error = kc.getError();
 	return this;
     };
 
diff --git a/src/main/java/de/ids_mannheim/korap/filter/BooleanFilter.java b/src/main/java/de/ids_mannheim/korap/filter/BooleanFilter.java
index 5a22198..b9bf69d 100644
--- a/src/main/java/de/ids_mannheim/korap/filter/BooleanFilter.java
+++ b/src/main/java/de/ids_mannheim/korap/filter/BooleanFilter.java
@@ -17,6 +17,8 @@
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.JsonNode;
 
+import de.ids_mannheim.korap.util.QueryException;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -38,18 +40,19 @@
     private String type;
 
     // Logger
-    private final static Logger jlog = LoggerFactory.getLogger(KorapFilter.class);
-
+    private final static Logger log = LoggerFactory.getLogger(KorapFilter.class);
 
     private BooleanQuery bool;
+    private String error;
 
     public BooleanFilter () {
 	bool = new BooleanQuery();
     };
 
-    public BooleanFilter (JsonNode json) {
+    public BooleanFilter (JsonNode json) throws QueryException {
 	bool = new BooleanQuery();
-
+	this.fromJSON(json, "tokens");
+	/*
 	String type = json.get("@type").asText();
 	String field = _getField(json);
 
@@ -62,12 +65,15 @@
 		this.fromJSON(operand, field);
 	    };
 	};
+	*/
     };
 
 
-    private void fromJSON (JsonNode json, String field) {
+    private void fromJSON (JsonNode json, String field) throws QueryException {
 	String type = json.get("@type").asText();
 
+	log.trace("@type: " + type);
+
 	if (json.has("@field"))
 	    field = _getField(json);
 
@@ -82,7 +88,10 @@
 
 	    String date, till;
 
+	    log.trace("relation: " + json.get("relation").asText());
+
 	    switch (json.get("relation").asText())  {
+
 	    case "between":
 		date = _getDate(json, 0);
 		till = _getDate(json, 1);
@@ -107,8 +116,23 @@
 		if (date != null)
 		    this.date(date);
 		break;
+
+	    case "and":
+		if (!json.has("operands"))
+		    return;
+
+		for (JsonNode operand : json.get("operands")) {
+		    this.fromJSON(operand, field);
+		};
+		break;
+
+	    default:
+		throw new QueryException(json.get("relation").asText() + " is not a supported relation");
 	    };
 	}
+	else {
+	    throw new QueryException(type + " is not a supported group");
+	};
     };
 
     private static String  _getField (JsonNode json)  {
@@ -232,7 +256,7 @@
 	    );
 	}
 	catch (NumberFormatException e) {
-	    jlog.warn("Parameter of till(date) is invalid");
+	    log.warn("Parameter of till(date) is invalid");
 	};
 	return this;
     };
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index e050a57..addc5d8 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -11,7 +11,8 @@
 #log4j.logger.de.ids_mannheim.korap.query.spans.MatchSpans = TRACE, stdout
 #log4j.logger.de.ids_mannheim.korap.KorapIndex = TRACE, stdout
 #log4j.logger.de.ids_mannheim.korap.KorapMatch = TRACE, stdout
-# log4j.logger.de.ids_mannheim.korap.KorapCollection = TRACE, stdout
+#log4j.logger.de.ids_mannheim.korap.KorapFilter = TRACE, stdout
+#log4j.logger.de.ids_mannheim.korap.KorapCollection = TRACE, stdout
 #log4j.logger.de.ids_mannheim.korap.index.PositionsToOffset = TRACE, stdout
 
 # log4j.logger.de.ids_mannheim.korap.analysis.MultiTermTokenStream = TRACE, stdout
