Just a small showcase query rewrite
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
index 0bb22f2..5fa21d0 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
@@ -117,7 +117,10 @@
SpanQuery query = this.segments.get(0);
// NextQueries:
- if (this.constraints == null || this.constraints.size() == 0) {
+ if (this.constraints == null || this.constraints.size() == 0 ||
+ (this.constraints.size() == 1 &&
+ (this.constraints.get(0).getMinDistance() == 1 &&
+ this.constraints.get(0).getMaxDistance() == 1))) {
for (int i = 1; i < this.segments.size(); i++) {
query = new SpanNextQuery(
query,