Small repository fix
diff --git a/pom.xml b/pom.xml
index 998ec36..f163d4f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
-->
<groupId>KorAP-modules</groupId>
<artifactId>KorAP-lucene-index</artifactId>
- <version>0.32</version>
+ <version>0.33</version>
<packaging>jar</packaging>
<name>KorAP-lucene-index</name>
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java
index 654cb52..a66df7c 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java
@@ -10,7 +10,8 @@
import org.apache.lucene.search.spans.Spans;
import org.apache.lucene.util.Bits;
-import de.ids_mannheim.korap.query.spans.ExpandedExclusionSpans;
+// Temporary:
+// import de.ids_mannheim.korap.query.spans.ExpandedExclusionSpans;
import de.ids_mannheim.korap.query.spans.ExpandedSpans;
/** Query to make a span longer by stretching out the start or the end
@@ -95,9 +96,12 @@
@Override
public Spans getSpans(AtomicReaderContext context, Bits acceptDocs,
Map<Term, TermContext> termContexts) throws IOException {
+ /*
+ Temporary:
if (isExclusion)
return new ExpandedExclusionSpans(this, context, acceptDocs, termContexts);
else
+ */
return new ExpandedSpans(this, context, acceptDocs, termContexts);
}
diff --git a/src/main/java/de/ids_mannheim/korap/query/SubspanQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanSubspanQuery.java
similarity index 91%
rename from src/main/java/de/ids_mannheim/korap/query/SubspanQuery.java
rename to src/main/java/de/ids_mannheim/korap/query/SpanSubspanQuery.java
index 4af5e69..a1aed2e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SubspanQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanSubspanQuery.java
@@ -19,11 +19,11 @@
*
* @author margaretha
* */
-public class SubspanQuery extends SimpleSpanQuery{
+public class SpanSubspanQuery extends SimpleSpanQuery{
private int startOffset, length;
- public SubspanQuery(SpanQuery firstClause, int startOffset, int length,
+ public SpanSubspanQuery(SpanQuery firstClause, int startOffset, int length,
boolean collectPayloads) {
super(firstClause, collectPayloads);
this.startOffset = startOffset;
@@ -32,7 +32,7 @@
@Override
public SimpleSpanQuery clone() {
- SubspanQuery sq = new SubspanQuery(
+ SpanSubspanQuery sq = new SpanSubspanQuery(
this.getFirstClause(),
this.startOffset,
this.length,
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 bec7671..0d984cd 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
@@ -8,13 +8,13 @@
import org.apache.lucene.index.TermContext;
import org.apache.lucene.util.Bits;
-import de.ids_mannheim.korap.query.SubspanQuery;
+import de.ids_mannheim.korap.query.SpanSubspanQuery;
public class SubSpans extends SimpleSpans{
private int startOffset, length;
- public SubSpans(SubspanQuery subspanQuery,
+ public SubSpans(SpanSubspanQuery subspanQuery,
AtomicReaderContext context, Bits acceptDocs,
Map<Term, TermContext> termContexts) throws IOException {
super(subspanQuery, context, acceptDocs, termContexts);
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
index 1a9524a..3acfc8a 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
@@ -115,11 +115,13 @@
SpanExpansionQuery seq = new SpanExpansionQuery(stq, notQuery, 0, 2, -1, true);
kr = ki.search(seq, (short) 10);
-
+
+ /*
for (KorapMatch km : kr.getMatches()){
System.out.println(km.getStartPos() +","+km.getEndPos()+" "
+km.getSnippetBrackets());
}
+ */
}
}
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java
index 179effa..feb9fd9 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java
@@ -12,7 +12,7 @@
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.DistanceConstraint;
import de.ids_mannheim.korap.query.SpanDistanceQuery;
-import de.ids_mannheim.korap.query.SubspanQuery;
+import de.ids_mannheim.korap.query.SpanSubspanQuery;
public class TestSubSpanIndex {
@@ -36,7 +36,7 @@
new DistanceConstraint(5, 5, true, false),
true);
- SubspanQuery ssq = new SubspanQuery(sdq, 0, 2, true);
+ SpanSubspanQuery ssq = new SpanSubspanQuery(sdq, 0, 2, true);
kr = ki.search(ssq, (short) 10);
assertEquals(27,kr.getTotalResults());
@@ -50,7 +50,7 @@
+km.getSnippetBrackets());
}*/
- ssq = new SubspanQuery(sdq, -2, 2, true);
+ ssq = new SpanSubspanQuery(sdq, -2, 2, true);
kr = ki.search(ssq, (short) 10);
assertEquals(34, kr.getMatch(0).getStartPos());