Added normalization for slash in Fingerprinter

Change-Id: I5c1dd9e4fdc0d73951a45e3feedddbfe07d75045
diff --git a/Changes b/Changes
index 7bb037d..c136284 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,4 @@
-0.60 2021-12-08
+0.60 2021-12-10
     - [feature] Implemented a new cache with on disk
       storage and auto-update (margaretha).
     - [feature] Support for tokenized snippet output
@@ -7,7 +7,8 @@
       SpanAttributeQuery (margaretha) 
     - [cleanup] Cleaned up imports (margaretha)
     - Added a delete method to VirtualCorpusCache (margaretha)
-      
+    - [feature] Added normalization for slash in Fingerprinter (margaretha)
+
 0.59.6 2021-11-10
     - [bugfix] Fixed skipping of focus spans (fixed #78; margaretha,
       diewald)
diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index fcec1e1..819a713 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -1870,6 +1870,7 @@
         for (LeafReaderContext context : leaves) {
             String fp = Fingerprinter.create(
                     context.reader().getCombinedCoreAndDeletesKey().toString());
+            fp = Fingerprinter.normalizeSlash(fp);
             fingerprints.add(fp);
         }
         return fingerprints;
diff --git a/src/main/java/de/ids_mannheim/korap/cache/VirtualCorpusCache.java b/src/main/java/de/ids_mannheim/korap/cache/VirtualCorpusCache.java
index d506c86..792e71e 100644
--- a/src/main/java/de/ids_mannheim/korap/cache/VirtualCorpusCache.java
+++ b/src/main/java/de/ids_mannheim/korap/cache/VirtualCorpusCache.java
@@ -101,7 +101,8 @@
         for (LeafReaderContext context : index.reader().leaves()) {
             leafFingerprint = Fingerprinter.create(
                     context.reader().getCombinedCoreAndDeletesKey().toString());
-
+            leafFingerprint = Fingerprinter.normalizeSlash(leafFingerprint);
+            
             getDocBits(vcId, leafFingerprint, () -> {
                 try {
                     return docBitsSupplier.supplyDocBits(context,
diff --git a/src/main/java/de/ids_mannheim/korap/collection/VirtualCorpusFilter.java b/src/main/java/de/ids_mannheim/korap/collection/VirtualCorpusFilter.java
index 33c5dca..883e069 100644
--- a/src/main/java/de/ids_mannheim/korap/collection/VirtualCorpusFilter.java
+++ b/src/main/java/de/ids_mannheim/korap/collection/VirtualCorpusFilter.java
@@ -35,6 +35,7 @@
             throws IOException {
         String leafFingerprint = Fingerprinter.create(
                 context.reader().getCombinedCoreAndDeletesKey().toString());
+        leafFingerprint = Fingerprinter.normalizeSlash(leafFingerprint);
         
         DocBits docBits = VirtualCorpusCache.getDocBits(vcId, leafFingerprint,
                 () -> {
diff --git a/src/main/java/de/ids_mannheim/korap/util/Fingerprinter.java b/src/main/java/de/ids_mannheim/korap/util/Fingerprinter.java
index e51197c..494477e 100644
--- a/src/main/java/de/ids_mannheim/korap/util/Fingerprinter.java
+++ b/src/main/java/de/ids_mannheim/korap/util/Fingerprinter.java
@@ -29,5 +29,9 @@
         return code;
 
     }
+    
+    public static String normalizeSlash (String code) {
+        return code.replace("/", "_");
+    }
 
 }