Added sample index conventional directory
Change-Id: I17915bf1ba61af6177322464617d4f6726b5e211
diff --git a/.gitignore b/.gitignore
index 7e4b9f1..04618c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,4 @@
/src/main/resources/korap.conf
/dependency-reduced-pom.xml
/bin
+/src/test/resources/sample-index
\ No newline at end of file
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 27d8bd9..745ef05 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
@@ -44,7 +44,6 @@
private KrillIndex ki;
private Result kr;
-
public SpanQuery createQuery (String x, String y,
List<DistanceConstraint> constraints, boolean isOrdered) {
@@ -280,11 +279,9 @@
@Test
- @Ignore
+ @Ignore("Private data usage")
public void testWithSampleIndex () throws IOException, QueryException {
- String path =
- "/home/elma/git/Kustvakt-new/src/test/resources/sample-index";
- KrillIndex sample = new KrillIndex(new MMapDirectory(Paths.get(path)));
+ KrillIndex sample = getSampleIndex();
WildcardQuery wcquery =
new WildcardQuery(new Term("tokens", "s:meine*"));
@@ -339,12 +336,10 @@
@Test
- @Ignore
+ @Ignore("Private data usage")
public void testWithSampleIndexAndJson ()
throws IOException, QueryException {
- String path =
- "/home/elma/git/Kustvakt-new/src/test/resources/sample-index";
- KrillIndex sample = new KrillIndex(new MMapDirectory(Paths.get(path)));
+ KrillIndex sample = getSampleIndex();
SpanQueryWrapper sqwi = getJSONQuery(getClass()
.getResource("/queries/bugs/cosmas_wildcards_all.jsonld")
.getFile());
@@ -386,11 +381,9 @@
@Test
- @Ignore
+ @Ignore("Private data usage")
public void testWithKrillWithCollection () throws IOException {
- String path =
- "/home/elma/git/Kustvakt-new/src/test/resources/sample-index";
- KrillIndex sample = new KrillIndex(new MMapDirectory(Paths.get(path)));
+ KrillIndex sample = getSampleIndex();
// collection .*
String json = getJsonString(getClass()
@@ -739,5 +732,12 @@
}
-
+ private KrillIndex getSampleIndex () throws IOException {
+ return new KrillIndex(
+ new MMapDirectory(
+ Paths.get(getClass().getResource("/sample-index").getFile()
+ )
+ )
+ );
+ };
}