Clear payload for correct highlighting
Change-Id: Ia61dc5a4d035c92cb9d5262a4ca95c59af5cad01
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java
index 5570b8f..52b657e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java
@@ -15,6 +15,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+// Todo: Sort candidate spans only for negative start offsets!
+
/**
* Enumeration of SubSpans, which are parts of another Spans. The
* SubSpans are specified with a start offset relative to the original
@@ -158,7 +160,8 @@
cs.setEnd(firstSpans.end());
}
- // matchPayload.clear();
+ // Claer payloads of candidatespan
+ cs.getPayloads().clear();
// Remove element payloads
for (byte[] payload : firstSpans.getPayload()) {
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index 1945bdb..7e03f21 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -6,7 +6,7 @@
# Spans:
# log4j.logger.de.ids_mannheim.korap.query.spans.ElementSpans = TRACE, stdout
# log4j.logger.de.ids_mannheim.korap.query.spans.AttributeSpans = TRACE, stdout
-log4j.logger.de.ids_mannheim.korap.query.spans.SubSpans = TRACE, stdout
+# log4j.logger.de.ids_mannheim.korap.query.spans.SubSpans = TRACE, stdout
# log4j.logger.de.ids_mannheim.korap.query.spans.ElementAttributeSpans = TRACE, stdout
# log4j.logger.de.ids_mannheim.korap.query.spans.KorapTermSpan = TRACE, stdout
# log4j.logger.de.ids_mannheim.korap.query.spans.WithinSpans = TRACE, stdout