slash classpath reference fix
diff --git a/src/main/java/de/ids_mannheim/korap/KorapIndex.java b/src/main/java/de/ids_mannheim/korap/KorapIndex.java
index 8d5b93d..bfd6c94 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapIndex.java
@@ -154,7 +154,7 @@
{
Properties prop = new Properties();
- URL file = getClass().getResource("/index.properties");
+ URL file = getClass().getClassLoader().getResource("index.properties");
if (file != null) {
String f = file.getFile();
diff --git a/src/main/java/de/ids_mannheim/korap/KorapIndexer.java b/src/main/java/de/ids_mannheim/korap/KorapIndexer.java
deleted file mode 100644
index b935db8..0000000
--- a/src/main/java/de/ids_mannheim/korap/KorapIndexer.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package de.ids_mannheim.korap;
-import java.util.*;
-import java.io.*;
-import org.apache.lucene.store.MMapDirectory;
-import de.ids_mannheim.korap.KorapIndex;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class KorapIndexer {
- KorapIndex index;
- String indexDir;
- int count;
- int commitCount;
-
- // Init logger
- private final static Logger log = LoggerFactory.getLogger(KorapIndexer.class);
-
- public KorapIndexer(Properties prop) throws IOException {
- this.indexDir = prop.getProperty("lucene.indexDir");
-
- System.out.println("Index to " + this.indexDir);
-
- String commitCount = prop.getProperty("lucene.index.commit.count", "1000");
-
- this.index = new KorapIndex(new MMapDirectory(new File(indexDir)));
- this.count = 0;
- this.commitCount = Integer.parseInt(commitCount);
- };
-
-
- public void parse (File dir) {
- for (String file : dir.list()) {
- if (file.matches("^[^\\.].+?\\.json\\.gz$")) {
- String found = dir.getPath() + '/' + file;
- System.out.print(" Index " + found + " ... ");
- if (this.index.addDocFile(found, true) == null) {
- System.out.println("fail.");
- continue;
- };
- System.out.println("done (" + count + ").");
- this.count++;
-
- if ((this.count % this.commitCount) == 0)
- this.commit();
- };
- };
- };
-
-
- public void commit () {
- System.out.println("-----");
- System.out.print(" Commit ... ");
- try {
- this.index.commit();
- }
- catch (IOException e) {
- System.err.println("Unable to commit to index " + this.indexDir);
- };
- System.out.println("done.");
- };
-
-
-
- public static void main (String[] argv) throws IOException {
- Properties prop = new Properties();
- InputStream fr = new FileInputStream(argv[0]);
- prop.load(fr);
- KorapIndexer ki = new KorapIndexer(prop);
- System.out.println();
-
- for (String arg : Arrays.copyOfRange(argv, 1, argv.length)) {
- File f = new File(arg);
- if (f.isDirectory())
- ki.parse(f);
- };
-
-
- // Final commit
- ki.commit();
-
- // Finish indexing
- System.out.println("-----");
- System.out.println(" Indexed " + ki.count + " files.");
- System.out.println();
- };
-};
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/KorapLongSpan.java b/src/main/java/de/ids_mannheim/korap/query/spans/KorapLongSpan.java
index 26a1367..96df20c 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/KorapLongSpan.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/KorapLongSpan.java
@@ -1,7 +1,5 @@
package de.ids_mannheim.korap.query.spans;
-import de.ids_mannheim.korap.query.spans.KorapSpan;
-
import java.util.Collection;
public class KorapLongSpan extends KorapSpan {
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
index 56724b4..92eab68 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
@@ -1013,9 +1013,9 @@
* this method may not be called at all for performance reasons. An ordered
* SpanQuery does not lazy load, so if you have payloads in your index and
* you do not want ordered SpanNearQuerys to collect payloads, you can
- * disable collection with a constructor option.<br>
+ * disable VCollection with a constructor option.<br>
* <br>
- * Note that the return type is a collection, thus the ordering should not be relied upon.
+ * Note that the return type is a VCollection, thus the ordering should not be relied upon.
* <br/>
* @lucene.experimental
*
diff --git a/src/main/java/de/ids_mannheim/korap/util/KorapArray.java b/src/main/java/de/ids_mannheim/korap/util/KorapArray.java
index 62d1b8c..f4f336c 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KorapArray.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KorapArray.java
@@ -5,7 +5,7 @@
/**
* @author Nils Diewald
*
- * A collection of Array specific utilities for the Korap project.
+ * A VCollection of Array specific utilities for the Korap project.
*/
public class KorapArray {
diff --git a/src/main/java/de/ids_mannheim/korap/util/KorapByte.java b/src/main/java/de/ids_mannheim/korap/util/KorapByte.java
index 9115ba7..898a100 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KorapByte.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KorapByte.java
@@ -7,7 +7,7 @@
/**
* @author Nils Diewald
*
- * A collection of methods to deal with Bytes and Byte arrays.
+ * A VCollection of methods to deal with Bytes and Byte arrays.
*/
public class KorapByte {
diff --git a/src/main/java/de/ids_mannheim/korap/util/KorapHTML.java b/src/main/java/de/ids_mannheim/korap/util/KorapHTML.java
index cadbb11..456d0a1 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KorapHTML.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KorapHTML.java
@@ -3,7 +3,7 @@
/**
* @author Nils Diewald
*
- * A collection of methods to deal with Bytes and Byte arrays.
+ * A VCollection of methods to deal with Bytes and Byte arrays.
*/
public class KorapHTML {
diff --git a/src/main/resources/korap.conf b/src/main/resources/korap.conf
new file mode 100644
index 0000000..1e1002f
--- /dev/null
+++ b/src/main/resources/korap.conf
@@ -0,0 +1,15 @@
+# Lucene Backend properties
+lucene.properties = true
+lucene.index = /data/indices
+lucene.index.commit.count = 134217000
+lucene.index.commit.log = log/korap.commit.log
+
+# Not active at the moment:
+lucene.index.search.count.default = 25
+lucene.index.search.count.max = 100
+lucene.index.search.context.left.type = token
+lucene.index.search.context.left.default = 6
+lucene.index.search.context.left.max = 12
+lucene.index.search.context.right.type = token
+lucene.index.search.context.right.default = 6
+lucene.index.search.context.right.max = 12