Added extend feature to class queries
diff --git a/src/main/java/de/ids_mannheim/korap/KorapMatch.java b/src/main/java/de/ids_mannheim/korap/KorapMatch.java
index 40bbc37..864ec0a 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapMatch.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapMatch.java
@@ -51,7 +51,7 @@
     private final static Logger log = LoggerFactory.getLogger(KorapMatch.class);
 
     // This advices the java compiler to ignore all loggings
-    public static final boolean DEBUG = false;
+    public static final boolean DEBUG = true;
 
     // Mapper for JSON serialization
     ObjectMapper mapper = new ObjectMapper();
@@ -717,12 +717,14 @@
 	// Add all highlights for character retrieval
 	if (this.highlight != null) {
 	    for (Highlight hl : this.highlight) {
-		pto.add(this.localDocID, hl.start);
-		pto.add(this.localDocID, hl.end);
+		if (hl.start >= this.getStartPos() && hl.end <= this.getEndPos()) {
+		    pto.add(this.localDocID, hl.start);
+		    pto.add(this.localDocID, hl.end);
 
-		if (DEBUG)
-		    log.trace("PTO will retrieve {} & {} (Highlight boundary)",
-			      hl.start, hl.end);
+		    if (DEBUG)
+			log.trace("PTO will retrieve {} & {} (Highlight boundary)",
+				  hl.start, hl.end);
+		};
 	    };
 	};
 	
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 8363bf2..93edca3 100644
--- a/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
+++ b/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
@@ -235,6 +235,7 @@
 
     @Override
     public void setLayerInfo (String layerInfo) {
+	System.err.println(layerInfo);
 	super.setLayerInfo(layerInfo);
 	this.addStored("layerInfo", layerInfo);
     };
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java
index 1c831ab..8fa1636 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java
@@ -124,6 +124,8 @@
 		    };
 		};
 
+		/*
+
 		if (DEBUG)
 		    log.trace("All payload processed, now clean up");
 
@@ -142,17 +144,18 @@
 			    highlightedPayload.remove(i);
 			    continue;
 			};
+
 			if (DEBUG) {
 			    bb.rewind();
 			    log.trace("Highlight {} will stay with {}-{} for {}-{}", i, bb.getInt(), bb.getInt(), start, end);
 			};
 		    };
-		    /*
-		     * Todo: SPLIT
-		     * Vorsicht! Bei divide könnten Payloads mehrmals vergeben werden
-		     * müssen!
-		     */
-		};
+		    // Todo: SPLIT
+		    // Vorsicht! Bei divide könnten Payloads mehrmals vergeben werden
+		    // müssen!
+		    
+		    };
+		*/
 	    };
 
 
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index d24d82c..e885412 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -19,7 +19,7 @@
 
 # Results:
 #log4j.logger.de.ids_mannheim.korap.KorapIndex = TRACE, stdout
-#log4j.logger.de.ids_mannheim.korap.KorapMatch = TRACE, stdout
+# log4j.logger.de.ids_mannheim.korap.KorapMatch = TRACE, stdout
 #log4j.logger.de.ids_mannheim.korap.index.PositionsToOffset = TRACE, stdout
 
 #log4j.logger.de.ids_mannheim.korap.index.TestSegmentIndex = TRACE, stdout