Renamed KorapIndex to KrillIndex
diff --git a/Changes b/Changes
index 38f5e09..0a7df5f 100644
--- a/Changes
+++ b/Changes
@@ -5,7 +5,8 @@
extract QueryBuilder from KrillQuery,
renamed KorapIndexer to index/Indexer,
renamed KorapDocument to model/AbstractDocument,
- renamed KorapMatch to response/Match (diewald)
+ renamed KorapMatch to response/Match,
+ renamed KorapIndex to KrillIndex (diewald)
- [documentation] Improved documentation for API classes (diewald)
0.50 2015-02-23
diff --git a/src/main/java/de/ids_mannheim/korap/KorapCollection.java b/src/main/java/de/ids_mannheim/korap/KorapCollection.java
index 5376493..e7be517 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapCollection.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapCollection.java
@@ -51,7 +51,7 @@
* 200805.mbox/%3C17080852.post@talk.nabble.com%3E
*/
public class KorapCollection extends Notifications {
- private KorapIndex index;
+ private KrillIndex index;
private KorapDate created;
private String id;
private ArrayList<FilterOperation> filter;
@@ -65,11 +65,11 @@
/**
- * Construct a new KorapCollection by passing a KorapIndex.
+ * Construct a new KorapCollection by passing a KrillIndex.
*
- * @param index The {@link KorapIndex} object.
+ * @param index The {@link KrillIndex} object.
*/
- public KorapCollection (KorapIndex index) {
+ public KorapCollection (KrillIndex index) {
this.index = index;
this.filter = new ArrayList<FilterOperation>(5);
};
@@ -413,11 +413,11 @@
/**
- * Set the {@link KorapIndex} the virtual collection refers to.
+ * Set the {@link KrillIndex} the virtual collection refers to.
*
- * @param index The {@link KorapIndex} the virtual collection refers to.
+ * @param index The {@link KrillIndex} the virtual collection refers to.
*/
- public void setIndex (KorapIndex index) {
+ public void setIndex (KrillIndex index) {
this.index = index;
};
@@ -696,7 +696,7 @@
* e.g. <i>documents</i> or <i>sentences</i> as a string.
* @return The number of the occurrences.
* @throws IOException
- * @see KorapIndex#numberOf
+ * @see KrillIndex#numberOf
*/
public long numberOf (String field, String type) throws IOException {
if (this.index == null)
@@ -715,7 +715,7 @@
* e.g. <i>documents</i> or <i>sentences</i> as a string.
* @return The number of the occurrences.
* @throws IOException
- * @see KorapIndex#numberOf
+ * @see KrillIndex#numberOf
*/
public long numberOf (String type) throws IOException {
if (this.index == null)
diff --git a/src/main/java/de/ids_mannheim/korap/KorapNode.java b/src/main/java/de/ids_mannheim/korap/KorapNode.java
index ddaab00..10a9710 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapNode.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapNode.java
@@ -13,7 +13,7 @@
import java.net.URI;
import java.beans.PropertyVetoException;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import org.apache.lucene.store.MMapDirectory;
import com.mchange.v2.c3p0.*;
@@ -32,7 +32,7 @@
private final static Logger log = LoggerFactory.getLogger(KorapNode.class);
// Index
- private static KorapIndex index;
+ private static KrillIndex index;
private static ComboPooledDataSource cpds;
private static String path,
name = "unknown";
@@ -185,7 +185,7 @@
// Get Lucene Index
- public static KorapIndex getIndex () {
+ public static KrillIndex getIndex () {
// Index already instantiated
if (index != null)
@@ -196,7 +196,7 @@
// Get a temporary index
if (path == null)
// Temporary index
- index = new KorapIndex();
+ index = new KrillIndex();
else {
File file = new File(path);
@@ -208,7 +208,7 @@
};
// Set real index
- index = new KorapIndex(new MMapDirectory(file));
+ index = new KrillIndex(new MMapDirectory(file));
};
return index;
}
diff --git a/src/main/java/de/ids_mannheim/korap/Krill.java b/src/main/java/de/ids_mannheim/korap/Krill.java
index 23d61ba..813bfa5 100644
--- a/src/main/java/de/ids_mannheim/korap/Krill.java
+++ b/src/main/java/de/ids_mannheim/korap/Krill.java
@@ -5,7 +5,7 @@
import org.apache.lucene.search.spans.SpanQuery;
import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.util.QueryException;
import de.ids_mannheim.korap.response.Notifications;
@@ -37,13 +37,13 @@
* @see KrillMeta
* @see KorapCollection
* @see KrillQuery
- * @see KorapIndex
+ * @see KrillIndex
*/
/*
* Todo: Use a configuration file
*/
public class Krill extends KorapResponse {
- private KorapIndex index;
+ private KrillIndex index;
private SpanQuery spanQuery;
private JsonNode request;
private String spanContext;
@@ -213,21 +213,21 @@
/**
- * Get the associated {@link KorapIndex} object.
+ * Get the associated {@link KrillIndex} object.
*
- * @return The associated {@link KorapIndex} object.
+ * @return The associated {@link KrillIndex} object.
*/
- public KorapIndex getIndex () {
+ public KrillIndex getIndex () {
return this.index;
};
/**
- * Set the associated {@link KorapIndex} object.
+ * Set the associated {@link KrillIndex} object.
*
- * @param index The associated {@link KorapIndex} object.
+ * @param index The associated {@link KrillIndex} object.
*/
- public Krill setIndex (KorapIndex index) {
+ public Krill setIndex (KrillIndex index) {
this.index = index;
return this;
};
@@ -236,11 +236,11 @@
/**
* Apply the KoralQuery to an index.
*
- * @param index The {@link KorapIndex}
+ * @param index The {@link KrillIndex}
* the search should be applyied to.
* @return The result as a {@link KorapResult} object.
*/
- public KorapResult apply (KorapIndex index) {
+ public KorapResult apply (KrillIndex index) {
return this.setIndex(index).apply();
};
diff --git a/src/main/java/de/ids_mannheim/korap/KorapIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
similarity index 98%
rename from src/main/java/de/ids_mannheim/korap/KorapIndex.java
rename to src/main/java/de/ids_mannheim/korap/KrillIndex.java
index 528868f..47eaa30 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -39,12 +39,12 @@
import org.slf4j.LoggerFactory;
/**
- * KorapIndex implements a simple API for searching in and writing to a
+ * KrillIndex implements a simple API for searching in and writing to a
* Lucene index and requesting several information about the index' nature.
* <br />
*
* <blockquote><pre>
- * KorapIndex ki = new KorapIndex(
+ * KrillIndex ki = new KrillIndex(
* new MMapDirectory(new File("/myindex"))
* );
* </pre></blockquote>
@@ -55,7 +55,6 @@
*
* @author diewald
*/
-
/*
TODO: Add word count as a meta data field!
TODO: Validate document import!
@@ -81,12 +80,10 @@
-> search for frequencies of VVFIN/gehen
-> c:VVFIN:[^:]*?:gehen:past:...
*/
-public class KorapIndex {
-
+public class KrillIndex {
// Todo: Use configuration
- // Last line of defense for simple DOS attacks!
- private int maxTermRelations = 100;
- private int autoCommit = 500;
+ private int maxTermRelations = 100, // Last line of defense
+ autoCommit = 500;
private Directory directory;
@@ -113,7 +110,7 @@
bbTerm = ByteBuffer.allocate(16);
// Logger
- private final static Logger log = LoggerFactory.getLogger(KorapIndex.class);
+ private final static Logger log = LoggerFactory.getLogger(KrillIndex.class);
// This advices the java compiler to ignore all loggings
public static final boolean DEBUG = false;
@@ -142,33 +139,33 @@
/**
- * Constructs a new KorapIndex in-memory.
+ * Constructs a new KrillIndex in-memory.
*
* @throws IOException
*/
- public KorapIndex () throws IOException {
+ public KrillIndex () throws IOException {
this((Directory) new RAMDirectory());
};
/**
- * Constructs a new KorapIndex bound to a persistant index.
+ * Constructs a new KrillIndex bound to a persistant index.
*
* @param index Path to an {@link FSDirectory} index
* @throws IOException
*/
- public KorapIndex (String index) throws IOException {
+ public KrillIndex (String index) throws IOException {
this(FSDirectory.open(new File( index )));
};
/**
- * Constructs a new KorapIndex bound to a persistant index.
+ * Constructs a new KrillIndex bound to a persistant index.
*
* @param directory A {@link Directory} pointing to an index
* @throws IOException
*/
- public KorapIndex (Directory directory) throws IOException {
+ public KrillIndex (Directory directory) throws IOException {
this.directory = directory;
// TODO: Shouldn't be here
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 4258676..16c5777 100644
--- a/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
+++ b/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
@@ -28,7 +28,7 @@
/**
* FieldDocument represents a simple API to create documents
- * for storing with KorapIndex. <i>Field</i> in the name resembles
+ * for storing with KrillIndex. <i>Field</i> in the name resembles
* the meaning of Lucene index fields.
*
* @author diewald
diff --git a/src/main/java/de/ids_mannheim/korap/index/Indexer.java b/src/main/java/de/ids_mannheim/korap/index/Indexer.java
index bfa15f2..7526767 100644
--- a/src/main/java/de/ids_mannheim/korap/index/Indexer.java
+++ b/src/main/java/de/ids_mannheim/korap/index/Indexer.java
@@ -2,7 +2,7 @@
import java.util.*;
import java.io.*;
import org.apache.lucene.store.MMapDirectory;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -16,14 +16,14 @@
* Usage: java -jar Krill-X.XX.jar [propfile] [directories]*
*/
public class Indexer {
- KorapIndex index;
+ KrillIndex index;
String indexDir;
int count;
int commitCount;
// Init logger
private final static Logger log =
- LoggerFactory.getLogger(KorapIndex.class);
+ LoggerFactory.getLogger(KrillIndex.class);
/**
@@ -43,7 +43,7 @@
String commitCount = prop.getProperty("lucene.index.commit.count", "1000");
// Create a new index object based on the directory
- this.index = new KorapIndex(new MMapDirectory(new File(indexDir)));
+ this.index = new KrillIndex(new MMapDirectory(new File(indexDir)));
this.count = 0;
this.commitCount = Integer.parseInt(commitCount);
};
diff --git a/src/main/java/de/ids_mannheim/korap/node/Resource.java b/src/main/java/de/ids_mannheim/korap/node/Resource.java
index 27d4f2f..b26b06c 100644
--- a/src/main/java/de/ids_mannheim/korap/node/Resource.java
+++ b/src/main/java/de/ids_mannheim/korap/node/Resource.java
@@ -21,7 +21,7 @@
import javax.ws.rs.WebApplicationException;
import de.ids_mannheim.korap.KorapNode;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.Krill;
import de.ids_mannheim.korap.KorapCollection;
import de.ids_mannheim.korap.KorapResult;
@@ -89,7 +89,7 @@
@GET
@Produces(MediaType.APPLICATION_JSON)
public String info () {
- KorapIndex index = KorapNode.getIndex();
+ KrillIndex index = KorapNode.getIndex();
KorapResponse kresp = new KorapResponse();
kresp.setNode(KorapNode.getName());
kresp.setName(index.getName());
@@ -136,7 +136,7 @@
log.trace("Added new document with unique identifier {}", uid);
// Get index
- KorapIndex index = KorapNode.getIndex();
+ KrillIndex index = KorapNode.getIndex();
KorapResponse kresp = new KorapResponse();
kresp.setNode(KorapNode.getName());
@@ -180,7 +180,7 @@
public String commit () {
// Get index
- KorapIndex index = KorapNode.getIndex();
+ KrillIndex index = KorapNode.getIndex();
KorapResponse kresp = new KorapResponse();
kresp.setNode(KorapNode.getName());
@@ -219,7 +219,7 @@
public String find (String json, @Context UriInfo uri) {
// Get index
- KorapIndex index = KorapNode.getIndex();
+ KrillIndex index = KorapNode.getIndex();
// Search index
if (index != null) {
@@ -276,7 +276,7 @@
@Context UriInfo uri) {
// Get index
- KorapIndex index = KorapNode.getIndex();
+ KrillIndex index = KorapNode.getIndex();
// No index found
if (index == null) {
@@ -334,7 +334,7 @@
public String search (String json) {
// Get index
- KorapIndex index = KorapNode.getIndex();
+ KrillIndex index = KorapNode.getIndex();
// Search index
if (index != null) {
@@ -359,7 +359,7 @@
@Context UriInfo uri) {
// Get index
- KorapIndex index = KorapNode.getIndex();
+ KrillIndex index = KorapNode.getIndex();
// Search index
if (index != null) {
@@ -444,7 +444,7 @@
public String collection (String json) {
// Get index
- KorapIndex index = KorapNode.getIndex();
+ KrillIndex index = KorapNode.getIndex();
if (index == null)
return "{\"documents\" : -1, error\" : \"No index given\" }";
diff --git a/src/test/java/de/ids_mannheim/korap/Test.java b/src/test/java/de/ids_mannheim/korap/Test.java
index f0c5960..7583518 100644
--- a/src/test/java/de/ids_mannheim/korap/Test.java
+++ b/src/test/java/de/ids_mannheim/korap/Test.java
@@ -18,7 +18,7 @@
import org.apache.lucene.index.IndexWriter;
/**
- * Helper class for testing the KorapIndex framework (Normal).
+ * Helper class for testing the KrillIndex framework (Normal).
*
* @author diewald
*/
diff --git a/src/test/java/de/ids_mannheim/korap/TestSimple.java b/src/test/java/de/ids_mannheim/korap/TestSimple.java
index ec741fd..5d33d4e 100644
--- a/src/test/java/de/ids_mannheim/korap/TestSimple.java
+++ b/src/test/java/de/ids_mannheim/korap/TestSimple.java
@@ -21,7 +21,7 @@
import org.apache.lucene.util.Bits;
/**
- * Helper class for testing the KorapIndex framework (Simple).
+ * Helper class for testing the KrillIndex framework (Simple).
*
* @author diewald
*/
diff --git a/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java b/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
index 06dc685..7292a14 100644
--- a/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
+++ b/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
@@ -3,7 +3,7 @@
import java.util.*;
import java.io.*;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.index.FieldDocument;
import de.ids_mannheim.korap.KorapCollection;
import de.ids_mannheim.korap.Krill;
@@ -32,7 +32,7 @@
prop.load(fr);
// Get the real index
- KorapIndex ki = new KorapIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
+ KrillIndex ki = new KrillIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
// Create a container for virtual collections:
KorapCollection kc = new KorapCollection(ki);
@@ -83,7 +83,7 @@
prop.load(fr);
// Get the real index
- KorapIndex ki = new KorapIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
+ KrillIndex ki = new KrillIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
// Create a container for virtual collections:
KorapCollection kc = new KorapCollection(ki);
@@ -126,7 +126,7 @@
prop.load(fr);
// Get the real index
- KorapIndex ki = new KorapIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
+ KrillIndex ki = new KrillIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
// Create a container for virtual collections:
KorapCollection kc = new KorapCollection(ki);
@@ -168,7 +168,7 @@
prop.load(fr);
// Get the real index
- KorapIndex ki = new KorapIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
+ KrillIndex ki = new KrillIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
// Create a container for virtual collections:
KorapCollection kc = new KorapCollection(ki);
@@ -280,7 +280,7 @@
double length = 0;
for (int i = 1; i <= rounds; i++) {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String d : docs) {
@@ -315,7 +315,7 @@
prop.load(fr);
// Get the real index
- KorapIndex ki = new KorapIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
+ KrillIndex ki = new KrillIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
// Create a container for virtual collections:
KorapCollection kc = new KorapCollection(ki);
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java b/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java
index 97bbffd..f890f1f 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java
@@ -2,7 +2,7 @@
import java.io.*;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.index.FieldDocument;
import de.ids_mannheim.korap.KorapCollection;
import de.ids_mannheim.korap.KorapResult;
@@ -28,7 +28,7 @@
public void filterExample () throws Exception {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -103,7 +103,7 @@
// That's exactly the same test class, but with multiple atomic indices
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -179,7 +179,7 @@
public void filterExample2 () throws Exception {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -229,7 +229,7 @@
public void uidCollection () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
int uid = 1;
for (String i : new String[] {"00001",
diff --git a/src/test/java/de/ids_mannheim/korap/highlight/TestClass.java b/src/test/java/de/ids_mannheim/korap/highlight/TestClass.java
index 9c1b399..a805ea6 100644
--- a/src/test/java/de/ids_mannheim/korap/highlight/TestClass.java
+++ b/src/test/java/de/ids_mannheim/korap/highlight/TestClass.java
@@ -10,7 +10,7 @@
import org.apache.lucene.search.spans.SpanQuery;
import org.junit.Test;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.response.Match;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
@@ -21,7 +21,7 @@
public class TestClass {
- KorapIndex ki;
+ KrillIndex ki;
KorapResult kr;
Krill ks;
@@ -37,7 +37,7 @@
SpanNextQuery sq = (SpanNextQuery) sqwi.toQuery();
//System.out.println(sq.toString());
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDocFile(
getClass().getResource("/wiki/JJJ-00785.json.gz").getFile(),true);
ki.addDocFile(
@@ -71,7 +71,7 @@
// System.out.println(sq.toString());
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDocFile(
getClass().getResource("/wiki/SSS-09803.json.gz").getFile(),true);
diff --git a/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java b/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
index 6c0a32b..b3ecb72 100644
--- a/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
+++ b/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
@@ -5,7 +5,7 @@
import org.apache.lucene.search.spans.SpanQuery;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.query.QueryBuilder;
import de.ids_mannheim.korap.KorapResult;
@@ -29,7 +29,7 @@
@Test
public void checkHighlights () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
String json = new String(
"{" +
" \"fields\" : [" +
@@ -100,7 +100,7 @@
@Test
public void checkHighlightsManually () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
String json = new String(
"{" +
" \"fields\" : [" +
@@ -139,7 +139,7 @@
@Test
public void highlightMissingBug () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
FieldDocument fd = new FieldDocument();
fd.addString("ID", "doc-1");
fd.addString("UID", "1");
@@ -270,7 +270,7 @@
public void highlightGreaterClassBug () throws IOException, QueryException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001", "00002"}) {
ki.addDocFile(
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java
index aa14142..2ba205d 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java
@@ -11,7 +11,7 @@
import org.apache.lucene.search.spans.SpanTermQuery;
import org.junit.Test;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.SpanAttributeQuery;
import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -20,12 +20,12 @@
public class TestAttributeIndex {
- private KorapIndex ki = new KorapIndex();
+ private KrillIndex ki = new KrillIndex();
private KorapResult kr;
private FieldDocument fd;
public TestAttributeIndex() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
}
private FieldDocument createFieldDoc0() {
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
index e19c5de..2bb6175 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
@@ -13,7 +13,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.SpanNextQuery;
@@ -34,7 +34,7 @@
@Test
public void indexExample1 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -225,7 +225,7 @@
@Test
public void indexExample2 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestDistanceExclusionIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestDistanceExclusionIndex.java
index 7e6413e..e5c4e82 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestDistanceExclusionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestDistanceExclusionIndex.java
@@ -9,7 +9,7 @@
import org.apache.lucene.search.spans.SpanTermQuery;
import org.junit.Test;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.DistanceConstraint;
import de.ids_mannheim.korap.query.SpanDistanceQuery;
@@ -18,14 +18,14 @@
public class TestDistanceExclusionIndex {
- private KorapIndex ki;
+ private KrillIndex ki;
private KorapResult kr;
/** Ordered, unordered
* */
@Test
public void testCase1() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
SpanQuery sq;
@@ -51,7 +51,7 @@
* */
@Test
public void testCase2() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.commit();
@@ -68,7 +68,7 @@
* */
@Test
public void testCase3() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -85,7 +85,7 @@
* */
@Test
public void testCase4() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc2());
ki.commit();
@@ -102,7 +102,7 @@
* */
@Test
public void testCase5() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -122,7 +122,7 @@
// Add skipTo test
@Test
public void testCase6() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
ki.commit();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestDistanceIndex.java
index eba418d..69f24fc 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestDistanceIndex.java
@@ -11,7 +11,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.DistanceConstraint;
import de.ids_mannheim.korap.query.SpanDistanceQuery;
@@ -21,7 +21,7 @@
@RunWith(JUnit4.class)
public class TestDistanceIndex {
KorapResult kr;
- KorapIndex ki;
+ KrillIndex ki;
private FieldDocument createFieldDoc0() {
FieldDocument fd = new FieldDocument();
@@ -95,7 +95,7 @@
* */
@Test
public void testCase1() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
SpanQuery sq;
@@ -135,7 +135,7 @@
* */
@Test
public void testCase2() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.commit();
@@ -167,7 +167,7 @@
* */
@Test
public void testCase3() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
ki.addDoc(createFieldDoc2());
@@ -188,7 +188,7 @@
* */
@Test
public void testCase4() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
ki.addDoc(createFieldDoc2());
@@ -212,7 +212,7 @@
/** ElementQueries */
@Test
public void testCase5() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.commit();
@@ -256,7 +256,7 @@
/** Skip to */
@Test
public void testCase6() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc2());
ki.addDoc(createFieldDoc1());
ki.commit();
@@ -289,7 +289,7 @@
/** Same tokens */
@Test
public void testCase7() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.commit();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceExclusionIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceExclusionIndex.java
index 2fde5e5..616bbf4 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceExclusionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceExclusionIndex.java
@@ -9,7 +9,7 @@
import org.apache.lucene.search.spans.SpanTermQuery;
import org.junit.Test;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.DistanceConstraint;
import de.ids_mannheim.korap.query.SpanDistanceQuery;
@@ -19,7 +19,7 @@
public class TestElementDistanceExclusionIndex {
KorapResult kr;
- KorapIndex ki;
+ KrillIndex ki;
private SpanQuery createQuery(String e, String x, String y, int min, int max, boolean isOrdered,
boolean exclusion){
@@ -90,7 +90,7 @@
* */
@Test
public void testCase1() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
SpanQuery sq;
@@ -106,7 +106,7 @@
* */
@Test
public void testCase2() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
SpanQuery sq;
@@ -129,7 +129,7 @@
* */
@Test
public void testCase3() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
SpanQuery sq;
@@ -155,7 +155,7 @@
* */
@Test
public void testCase4() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.commit();
@@ -178,7 +178,7 @@
* */
@Test
public void testCase5() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc0());
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
index 8905440..b5eed89 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
@@ -15,7 +15,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.response.Match;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
@@ -31,7 +31,7 @@
public class TestElementDistanceIndex {
KorapResult kr;
- KorapIndex ki;
+ KrillIndex ki;
private FieldDocument createFieldDoc0() {
FieldDocument fd = new FieldDocument();
@@ -110,7 +110,7 @@
@Test
public void testCase1() throws IOException{
//System.out.println("testCase1");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.commit();
@@ -131,7 +131,7 @@
@Test
public void testCase2() throws IOException{
//System.out.println("testCase2");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
@@ -152,7 +152,7 @@
@Test
public void testCase3() throws IOException{
//System.out.println("testCase3");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc3());
@@ -177,7 +177,7 @@
@Test
public void testCase4() throws IOException{
//System.out.println("testCase4");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -197,7 +197,7 @@
@Test
public void testCase5() throws Exception{
//System.out.println("testCase4");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDocFile(getClass().getResource("/wiki/00001.json.gz").getFile(),true);
ki.commit();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestElementIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestElementIndex.java
index e16d9d8..00179be 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementIndex.java
@@ -13,7 +13,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -31,7 +31,7 @@
@Test
public void indexExample1 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// <a>x<a>y<a>zhij</a>hij</a>hij</a>hij</a>
FieldDocument fd = new FieldDocument();
@@ -99,7 +99,7 @@
@Test
public void indexExample2 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// <a><a><a>h</a>hhij</a>hij</a>hij</a>
FieldDocument fd = new FieldDocument();
@@ -137,7 +137,7 @@
@Test
public void indexExample3 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// <a><a><a>u</a></a></a>
FieldDocument fd = new FieldDocument();
@@ -262,7 +262,7 @@
@Test
public void indexExample4 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
FieldDocument fd = new FieldDocument();
fd.addTV("base",
@@ -295,7 +295,7 @@
@Test
public void indexExample5 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
FieldDocument fd = new FieldDocument();
fd.addTV("base",
@@ -330,7 +330,7 @@
@Test
public void indexExample6 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// <a>x<a>y<a>zhij</a>hij</a>hij</a>
FieldDocument fd = new FieldDocument();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
index b551db3..161c0a1 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
@@ -16,7 +16,7 @@
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.ObjectMapper;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.Krill;
@@ -120,7 +120,7 @@
" \"pubPlace\" : \"Bochum\"" +
"}");
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
FieldDocument fd = ki.addDoc(json);
ki.commit();
@@ -158,7 +158,7 @@
public void indexExample3 () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
@@ -207,7 +207,7 @@
public void queryJSONBsp18 () throws Exception {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestKorapDocument.java b/src/test/java/de/ids_mannheim/korap/index/TestKrillDocument.java
similarity index 96%
rename from src/test/java/de/ids_mannheim/korap/index/TestKorapDocument.java
rename to src/test/java/de/ids_mannheim/korap/index/TestKrillDocument.java
index ebc29d9..8ef16b2 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestKorapDocument.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestKrillDocument.java
@@ -18,13 +18,13 @@
import de.ids_mannheim.korap.model.AbstractDocument;
@RunWith(JUnit4.class)
-public class TestKorapDocument {
+public class TestKrillDocument {
- private class KorapRealDocument extends AbstractDocument {};
+ private class KrillRealDocument extends AbstractDocument {};
@Test
public void createDocument () throws IOException {
- KorapRealDocument krd = new KorapRealDocument();
+ KrillRealDocument krd = new KrillRealDocument();
krd.setPubDate("2014-10-12");
assertEquals("20141012", krd.getPubDate().toString());
assertEquals("2014-10-12", krd.getPubDateString());
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestKorapIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestKrillIndex.java
similarity index 95%
rename from src/test/java/de/ids_mannheim/korap/index/TestKorapIndex.java
rename to src/test/java/de/ids_mannheim/korap/index/TestKrillIndex.java
index e7fcc0a..05e2124 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestKorapIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestKrillIndex.java
@@ -13,17 +13,17 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.index.FieldDocument;
import de.ids_mannheim.korap.model.MultiTermTokenStream;
@RunWith(JUnit4.class)
-public class TestKorapIndex {
+public class TestKrillIndex {
@Test
public void indexExample () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
assertEquals(0, ki.numberOf("base", "documents"));
assertEquals(0, ki.numberOf("base", "tokens"));
@@ -86,7 +86,7 @@
@Test
public void indexAlteration () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
assertEquals(0, ki.numberOf("base", "documents"));
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java
index fd6ee8d..acfb9f5 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java
@@ -13,7 +13,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.response.Match;
import de.ids_mannheim.korap.index.MatchCollector;
@@ -38,7 +38,7 @@
@Test
public void indexExample1 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
index 94d639f..589e964 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
@@ -12,7 +12,7 @@
import de.ids_mannheim.korap.response.match.MatchIdentifier;
import de.ids_mannheim.korap.response.match.PosIdentifier;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.Krill;
import de.ids_mannheim.korap.query.QueryBuilder;
@@ -88,7 +88,7 @@
@Test
public void indexExample1 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createSimpleFieldDoc());
ki.commit();
@@ -110,7 +110,7 @@
@Test
public void indexExample2 () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createSimpleFieldDoc());
ki.commit();
@@ -213,7 +213,7 @@
@Test
public void indexExample3 () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createSimpleFieldDoc());
ki.commit();
@@ -263,7 +263,7 @@
@Test
public void indexExample4 () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createSimpleFieldDoc());
ki.commit();
@@ -309,7 +309,7 @@
@Test
public void indexExample5Spans () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createSimpleFieldDoc());
ki.commit();
@@ -328,7 +328,7 @@
@Test
public void indexExample6Spans () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createSimpleFieldDoc());
ki.commit();
@@ -347,7 +347,7 @@
@Test
public void indexExample7Spans () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createSimpleFieldDoc());
ki.commit();
@@ -410,7 +410,7 @@
@Test
public void indexExample6Relations () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createSimpleFieldDoc());
ki.commit();
@@ -502,7 +502,7 @@
@Test
public void indexExample7SentenceExpansion () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createSimpleFieldDoc());
ki.addDoc(createSimpleFieldDoc2());
ki.addDoc(createSimpleFieldDoc3());
@@ -558,7 +558,7 @@
@Test
public void indexExample7Dependencies () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createSimpleFieldDoc2());
ki.commit();
@@ -619,7 +619,7 @@
@Test
public void indexExampleMultipleFoundries () throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createSimpleFieldDoc4());
ki.commit();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
index ca98734..31186b4 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
@@ -13,7 +13,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.KorapCollection;
@@ -36,7 +36,7 @@
@Test
public void indexExample1 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -211,7 +211,7 @@
@Test
public void indexExample2 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -266,7 +266,7 @@
@Test
public void indexExample3 () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -300,7 +300,7 @@
@Test
public void indexExampleExtend () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -360,7 +360,7 @@
@Test
public void indexExampleFocusWithSpan () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -406,7 +406,7 @@
@Test
public void indexExampleFocusWithSkip () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
index b57e888..ada1e21 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
@@ -13,7 +13,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.DistanceConstraint;
import de.ids_mannheim.korap.query.SpanDistanceQuery;
@@ -24,7 +24,7 @@
@RunWith(JUnit4.class)
public class TestMultipleDistanceIndex {
- private KorapIndex ki;
+ private KrillIndex ki;
private KorapResult kr;
public SpanQuery createQuery(String x, String y, List<DistanceConstraint>
@@ -108,7 +108,7 @@
* */
@Test
public void testCase1() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -137,7 +137,7 @@
* */
@Test
public void testCase2() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -188,7 +188,7 @@
* */
@Test
public void testCase3() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
@@ -228,7 +228,7 @@
* */
@Test
public void testCase4() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc3());
ki.addDoc(createFieldDoc1());
@@ -259,7 +259,7 @@
* */
@Test
public void testCase5() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.commit();
@@ -290,7 +290,7 @@
* */
@Test
public void testCase6() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc3());
ki.commit();
@@ -333,7 +333,7 @@
* */
@Test
public void testCase7() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc2());
ki.commit();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java
index e3c325f..e254f3a 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java
@@ -14,7 +14,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.response.Match;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
@@ -41,7 +41,7 @@
@Test
public void indexExample1 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -118,7 +118,7 @@
@Test
public void indexExample2 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -153,7 +153,7 @@
@Test
public void indexExample3 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -187,7 +187,7 @@
@Test
public void indexExample4 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
// abc<x>abc<x>a</x>b</x>ac
@@ -263,7 +263,7 @@
* */
@Test
public void indexExample5 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
ki.commit();
@@ -301,7 +301,7 @@
/** Skip to NextSpan */
@Test
public void indexExample6() throws IOException{
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
ki.addDoc(createFieldDoc3());
@@ -325,7 +325,7 @@
@Test
public void indexExample7Distances () throws Exception{
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
ki.addDoc(createFieldDoc3());
@@ -345,7 +345,7 @@
@Test
public void indexExample8Distances () throws Exception{
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
ki.addDoc(createFieldDoc3());
@@ -365,7 +365,7 @@
@Test
public void indexExample9() throws IOException{
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.commit();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestPosToOffset.java b/src/test/java/de/ids_mannheim/korap/index/TestPosToOffset.java
index 26f13c4..d87d5b6 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestPosToOffset.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestPosToOffset.java
@@ -9,7 +9,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -37,7 +37,7 @@
@Test
public void indexExample1 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
FieldDocument fd = new FieldDocument();
fd.addTV("base",
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java
index 6c589ff..0c022bf 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java
@@ -18,7 +18,7 @@
import de.ids_mannheim.korap.util.QueryException;
public class TestRealIndex {
- KorapIndex ki;
+ KrillIndex ki;
KorapResult kr;
Krill ks;
@@ -30,7 +30,7 @@
String indexPath = prop.getProperty("lucene.indexDir");
System.err.println(indexPath);
MMapDirectory md = new MMapDirectory(new File(indexPath));
- ki = new KorapIndex(md);
+ ki = new KrillIndex(md);
};
@Test
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRegexWildcardIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRegexWildcardIndex.java
index 5dffbee..9b9370a 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRegexWildcardIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRegexWildcardIndex.java
@@ -13,7 +13,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.Krill;
@@ -29,7 +29,7 @@
@Test
public void indexRegex () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -86,7 +86,7 @@
@Test
public void indexWildcard () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -145,7 +145,7 @@
@Test
public void indexRegexCaseInsensitive () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -210,7 +210,7 @@
@Test
public void indexRegexCombined () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
@@ -246,7 +246,7 @@
@Test
public void indexRegexWithinRewrite () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// abcabcabac
FieldDocument fd = new FieldDocument();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
index 4a9227f..38a1495 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
@@ -8,7 +8,7 @@
import org.apache.lucene.search.spans.SpanTermQuery;
import org.junit.Test;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.response.Match;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.SpanAttributeQuery;
@@ -59,11 +59,11 @@
*/
public class TestRelationIndex {
- private KorapIndex ki;
+ private KrillIndex ki;
private KorapResult kr;
public TestRelationIndex() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
}
private FieldDocument createFieldDoc0(){
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java
index affd5a3..220ca59 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java
@@ -10,7 +10,7 @@
import org.apache.lucene.search.spans.SpanTermQuery;
import org.junit.Test;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.response.Match;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.SpanNextQuery;
@@ -18,7 +18,7 @@
public class TestRepetitionIndex {
- private KorapIndex ki;
+ private KrillIndex ki;
private KorapResult kr;
private FieldDocument createFieldDoc0(){
@@ -85,7 +85,7 @@
@Test
public void testCase1() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -126,7 +126,7 @@
/** Skip to */
@Test
public void testCase2() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc3());
ki.addDoc(createFieldDoc2());
@@ -156,7 +156,7 @@
/** OR */
@Test
public void testCase3() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -182,7 +182,7 @@
@Test
public void testCase4() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.commit();
@@ -210,7 +210,7 @@
@Test
public void testCase5() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDocFile(
getClass().getResource("/wiki/00001.json.gz").getFile(), true
);
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java
index e05d730..d70f8b9 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java
@@ -13,7 +13,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.SpanElementQuery;
import de.ids_mannheim.korap.query.SpanNextQuery;
@@ -25,13 +25,13 @@
@RunWith(JUnit4.class)
public class TestSegmentIndex {
private SpanQuery sq;
- private KorapIndex ki;
+ private KrillIndex ki;
private KorapResult kr;
private FieldDocument fd;
private Logger log;
public TestSegmentIndex() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
@@ -109,7 +109,7 @@
public void testCase4() throws IOException{
// log.trace("Testcase4");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
ki.addDoc(createFieldDoc1());
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSegmentNegationIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSegmentNegationIndex.java
index d9a23f3..70308a8 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSegmentNegationIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSegmentNegationIndex.java
@@ -13,7 +13,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.SpanElementQuery;
import de.ids_mannheim.korap.query.SpanNextQuery;
@@ -24,14 +24,14 @@
@RunWith(JUnit4.class)
public class TestSegmentNegationIndex {
private SpanQuery sq;
- private KorapIndex ki;
+ private KrillIndex ki;
private KorapResult kr;
private FieldDocument fd;
private Logger log;
@Test
public void testcaseNegation() throws Exception {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
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 7ec87db..123d8e3 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
@@ -15,7 +15,7 @@
import org.apache.lucene.util.automaton.RegExp;
import org.junit.Test;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -27,10 +27,10 @@
public class TestSpanExpansionIndex {
KorapResult kr;
- KorapIndex ki;
+ KrillIndex ki;
public TestSpanExpansionIndex() throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDocFile(getClass().getResource("/wiki/00001.json.gz").getFile(),
true);
ki.commit();
@@ -216,7 +216,7 @@
* */
@Test
public void testCase5() throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -253,7 +253,7 @@
* */
@Test
public void testCase6() throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createFieldDoc0()); // same doc
ki.addDoc(createFieldDoc1()); // only not clause
ki.addDoc(createFieldDoc2()); // only main clause
@@ -282,7 +282,7 @@
* */
@Test
public void testCase7() throws IOException, QueryException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDocFile(getClass().getResource("/wiki/00001.json.gz").getFile(),
true);
ki.addDocFile(getClass().getResource("/wiki/00002.json.gz").getFile(),
@@ -315,7 +315,7 @@
* */
@Test
public void testQueryRewriteBug() throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(createFieldDoc0()); // same doc
ki.addDoc(createFieldDoc1()); // only not clause
ki.addDoc(createFieldDoc2()); // only main clause
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 d6346f8..22541d0 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java
@@ -8,7 +8,7 @@
import org.apache.lucene.search.spans.SpanTermQuery;
import org.junit.Test;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.DistanceConstraint;
import de.ids_mannheim.korap.query.SpanDistanceQuery;
@@ -17,10 +17,10 @@
public class TestSubSpanIndex {
KorapResult kr;
- KorapIndex ki;
+ KrillIndex ki;
public TestSubSpanIndex () throws IOException {
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDocFile(getClass().getResource("/wiki/00001.json.gz").getFile(),
true);
ki.commit();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java
index a26d1b3..c32a7aa 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java
@@ -11,7 +11,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.DistanceConstraint;
import de.ids_mannheim.korap.query.SpanDistanceQuery;
@@ -21,7 +21,7 @@
@RunWith(JUnit4.class)
public class TestUnorderedDistanceIndex{
- private KorapIndex ki;
+ private KrillIndex ki;
private KorapResult kr;
private FieldDocument createFieldDoc0(){
@@ -105,7 +105,7 @@
@Test
public void testCase1() throws IOException{
//System.out.println("testcase 1");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -124,7 +124,7 @@
@Test
public void testCase2() throws IOException{
//System.out.println("testcase 2");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.commit();
@@ -142,7 +142,7 @@
@Test
public void testCase3() throws IOException{
//System.out.println("testcase 3");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
@@ -164,7 +164,7 @@
@Test
public void testCase4() throws IOException{
//System.out.println("testcase 4");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
@@ -187,7 +187,7 @@
/** ElementQueries */
@Test
public void testCase5() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -236,7 +236,7 @@
* */
@Test
public void testCase6() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -252,7 +252,7 @@
@Test
public void testCase7() throws IOException{
//System.out.println("testcase 7");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.commit();
@@ -278,7 +278,7 @@
* */
@Test
public void testCase8() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.commit();
SpanQuery sq = new SpanNextQuery(
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestUnorderedElementDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestUnorderedElementDistanceIndex.java
index 1f4e094..a9ad58e 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestUnorderedElementDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestUnorderedElementDistanceIndex.java
@@ -11,7 +11,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.query.DistanceConstraint;
import de.ids_mannheim.korap.query.SpanDistanceQuery;
@@ -21,7 +21,7 @@
@RunWith(JUnit4.class)
public class TestUnorderedElementDistanceIndex {
- private KorapIndex ki;
+ private KrillIndex ki;
private KorapResult kr;
private FieldDocument createFieldDoc0() {
@@ -108,7 +108,7 @@
@Test
public void testCase1() throws IOException{
//System.out.println("testCase1");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
@@ -137,7 +137,7 @@
@Test
public void testCase2() throws IOException{
//System.out.println("testCase2");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc2());
@@ -162,7 +162,7 @@
@Test
public void testCase3() throws IOException{
//System.out.println("testCase3");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.commit();
@@ -186,7 +186,7 @@
@Test
public void testCase4() throws IOException{
//System.out.println("testCase4");
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc1());
ki.addDoc(createFieldDoc0());
ki.addDoc(createFieldDoc3());
@@ -217,7 +217,7 @@
/** Next */
@Test
public void testCase5() throws IOException{
- ki = new KorapIndex();
+ ki = new KrillIndex();
ki.addDoc(createFieldDoc0());
ki.commit();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
index 4775399..0c742ce 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
@@ -14,7 +14,7 @@
import org.junit.Test;
import de.ids_mannheim.korap.KorapCollection;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.response.Match;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.Krill;
@@ -27,7 +27,7 @@
public class TestWPDIndex {
long start, end;
- KorapIndex ki;
+ KrillIndex ki;
KorapResult kr;
Krill ks;
@@ -61,7 +61,7 @@
String indexPath = prop.getProperty("lucene.indexDir");
MMapDirectory md = new MMapDirectory(new File(indexPath));
- ki = new KorapIndex(md);
+ ki = new KrillIndex(md);
}
/** Token distance spans */
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
index cb76846..df59a05 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
@@ -14,7 +14,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.response.Match;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
@@ -46,7 +46,7 @@
@Test
public void indexExample1a () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// <a>x<a>y<a>zhij</a>hij</a>hij</a>
FieldDocument fd = new FieldDocument();
@@ -99,7 +99,7 @@
@Test
public void indexExample1b () throws IOException {
// Cases 9, 12, 13
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// <a>x<a>y<a>zhij</a>hij</a>hij</a>
FieldDocument fd = new FieldDocument();
@@ -205,7 +205,7 @@
@Test
public void indexExample1c () throws IOException {
// Cases 9, 12, 13
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// <a>x<a>y<a>zhij</a>hij</a>hij</a>
FieldDocument fd = new FieldDocument();
@@ -284,7 +284,7 @@
@Test
public void indexExample1d () throws IOException {
// Cases 9, 12, 13
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// <a>x<a>y<a>zhij</a>hij</a>hij</a>
FieldDocument fd = new FieldDocument();
@@ -373,7 +373,7 @@
@Test
public void indexExample2a () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// <a><a><a>h</a>hij</a>hij</a>
FieldDocument fd = new FieldDocument();
@@ -446,7 +446,7 @@
@Test
public void indexExample2b () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// 6,9,12
// <a><a><a>h</a>hij</a>hij</a>h
@@ -513,7 +513,7 @@
@Test
public void indexExample2c () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// 2, 6, 9, 12
// <a><a><a>h</a>hij</a>hij</a>h<a>i</i>
@@ -588,7 +588,7 @@
@Test
public void indexExample2d () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// 2, 6, 9, 12, 7
// <a><a><a>h</a>hij</a>hij</a>h<a>h</h>
@@ -674,7 +674,7 @@
@Test
public void indexExample3 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// <a><a><a>u</a></a></a>
FieldDocument fd = new FieldDocument();
@@ -793,7 +793,7 @@
@Test
public void indexExample3Offsets () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Er schrie: <s>"Das war ich!"</s>
FieldDocument fd = new FieldDocument();
@@ -903,7 +903,7 @@
@Test
public void indexExample4 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Case 1, 6, 7, 13
// xy<a><a>x</a>b<a>c</a></a>x
@@ -940,7 +940,7 @@
@Test
public void indexExample5 () throws IOException {
// 1,2,3,6,9,10,12
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// hij<a>hi<a>h<a>ij</a></a>hi</a>
FieldDocument fd = new FieldDocument();
@@ -987,7 +987,7 @@
@Test
public void indexExample6 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// 2,5,8,12,13
// h<a><a>i</a>j</a><a>h</a>i j<a>h i</a>j
FieldDocument fd = new FieldDocument();
@@ -1027,7 +1027,7 @@
@Test
public void indexExample7 () throws IOException {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// 4,5,11,13
// x<a>x h</a>i j h<a>i j</a>
FieldDocument fd = new FieldDocument();
@@ -1068,7 +1068,7 @@
/** SpanElementQueries */
@Test
public void indexExample8() throws IOException{
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
FieldDocument fd = new FieldDocument();
// <a>xx <e>hi j <e>hi j</e></e></a>
fd.addTV("base",
@@ -1094,7 +1094,7 @@
SpanWithinQuery sq = (SpanWithinQuery) sqwi.toQuery();
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDocFile(
getClass().getResource("/wiki/DDD-08370.json.gz").getFile(),
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQuery.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQuery.java
index 4115e59..c84b33a 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQuery.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQuery.java
@@ -159,12 +159,11 @@
scqw.toQuery();
}
catch (Exception e) {
- fail(e.getMessage() + "(Known issue)");
+ fail(e.getMessage() + " (Known issue)");
};
// assertEquals("", scqw.toQuery().toString());
/*
-
sssq = new SpanSequenceQueryWrapper("field");
sssc = new SpanClassQueryWrapper(sssq, (short) 2);
SpanSequenceQueryWrapper sssq2 = new SpanSequenceQueryWrapper("field");
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java b/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
index 875df5f..df6533f 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
@@ -5,7 +5,7 @@
import org.apache.lucene.search.spans.SpanQuery;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.Krill;
@@ -29,7 +29,7 @@
public void classRefCheckNotSupported () throws IOException, QueryException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
String json = new String(
"{" +
" \"fields\" : [" +
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java b/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java
index f065b83..141fd42 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java
@@ -6,7 +6,7 @@
import org.apache.lucene.search.spans.SpanQuery;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.KrillQuery;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.Krill;
@@ -32,7 +32,7 @@
@Test
public void checkJSONResult () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
FieldDocument fd = new FieldDocument();
fd.addString("ID", "doc-1");
fd.addString("UID", "1");
@@ -100,7 +100,7 @@
@Test
public void checkJSONResultWarningBug () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
FieldDocument fd = new FieldDocument();
fd.addString("ID", "doc-1");
fd.addString("UID", "1");
@@ -131,7 +131,7 @@
@Test
public void checkJSONResultForJSONInput () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
FieldDocument fd = new FieldDocument();
fd.addString("ID", "doc-1");
fd.addString("UID", "1");
@@ -199,7 +199,7 @@
@Test
public void checkJSONTokenResult () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
FieldDocument fd = new FieldDocument();
fd.addString("ID", "doc-1");
fd.addString("UID", "1");
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestKrill.java b/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
index b22bd7a..67c67f4 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
@@ -9,7 +9,7 @@
import de.ids_mannheim.korap.KrillMeta;
import de.ids_mannheim.korap.KorapCollection;
import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.query.QueryBuilder;
import de.ids_mannheim.korap.index.FieldDocument;
import de.ids_mannheim.korap.meta.SearchContext;
@@ -85,7 +85,7 @@
@Test
public void searchIndex () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -136,7 +136,7 @@
@Test
public void searchJSON () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -170,7 +170,7 @@
@Test
public void searchJSON2 () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -230,7 +230,7 @@
@Test
public void searchJSONFailure () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -255,7 +255,7 @@
@Test
public void searchJSONindexboundary () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -285,7 +285,7 @@
@Test
public void searchJSONindexboundary2 () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -315,7 +315,7 @@
@Test
public void searchJSONcontext () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -375,7 +375,7 @@
@Test
public void searchJSONstartPage () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -422,7 +422,7 @@
@Test
public void searchJSONitemsPerResource () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -509,7 +509,7 @@
* TestResource#testCollection
*/
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
int uid = 1;
for (String i : new String[] {"00001",
@@ -552,7 +552,7 @@
@Test
public void searchJSONnewJSON () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
FieldDocument fd = ki.addDocFile(
1,
@@ -639,7 +639,7 @@
@Test
public void searchJSONnewJSON2 () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
FieldDocument fd = ki.addDocFile(
1,
@@ -730,7 +730,7 @@
@Test
public void searchJSONcosmasBoundaryBug () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
FieldDocument fd = ki.addDocFile(
1,
@@ -805,7 +805,7 @@
@Test
public void searchJSONmultipleClassesBug () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
ki.addDocFile(
1,
@@ -850,7 +850,7 @@
@Test
public void searchJSONmultipleClassesBugTokenList () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
ki.addDocFile(
1,
@@ -902,7 +902,7 @@
@Test
public void searchJSONmultitermRewriteBug () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
assertEquals(ki.numberOf("documents"), 0);
@@ -986,7 +986,7 @@
@Test
public void searchJSONCollection () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -1079,7 +1079,7 @@
@Test
public void searchJSONSentenceContext () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -1150,7 +1150,7 @@
@Test
public void searchJSONbug () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -1189,7 +1189,7 @@
@Test
public void searchJSONexpansionBug () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
ki.addDocFile(
getClass().
@@ -1233,7 +1233,7 @@
assertEquals(kr.getTotalResults(), 1);
// Now try with one file ahead
- ki = new KorapIndex();
+ ki = new KrillIndex();
for (String i : new String[] {"00001",
"00002"}) {
ki.addDocFile(
@@ -1285,7 +1285,7 @@
@Test
public void getFoundryDistribution () throws Exception {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002",
@@ -1318,7 +1318,7 @@
@Test
public void getTextClassDistribution () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(
"{" +
" \"fields\" : [" +
@@ -1382,7 +1382,7 @@
@Test
public void getTextClassDistribution2 () throws Exception {
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
ki.addDoc(
"{" +
" \"fields\" : [" +
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java b/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
index 876d645..c6bc671 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
@@ -8,7 +8,7 @@
import de.ids_mannheim.korap.Krill;
import de.ids_mannheim.korap.KorapCollection;
import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KrillIndex;
import de.ids_mannheim.korap.index.FieldDocument;
import de.ids_mannheim.korap.meta.SearchContext;
import de.ids_mannheim.korap.KorapResult;
@@ -34,7 +34,7 @@
public void searchMetaFields () throws IOException {
// Construct index
- KorapIndex ki = new KorapIndex();
+ KrillIndex ki = new KrillIndex();
// Indexing test files
for (String i : new String[] {"00001",
"00002"}) {