diff --git a/src/main/java/de/ids_mannheim/korap/KorapIndex.java b/src/main/java/de/ids_mannheim/korap/KorapIndex.java
index f9a758a..edeb8de 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapIndex.java
@@ -2,10 +2,9 @@
 
 import java.util.*;
 
-import java.io.File;
-import java.io.IOException;
+import java.io.*;
 
-// import java.net.URL;
+import java.net.URL;
 
 import java.nio.ByteBuffer;
 import java.util.zip.GZIPInputStream;
@@ -118,6 +117,7 @@
     private int autoCommit = 500; // Todo: Use configuration
     private HashMap termContexts;
     private ObjectMapper mapper = new ObjectMapper();
+    private String version;
 
 
     private static ByteBuffer bb       = ByteBuffer.allocate(4),
@@ -134,6 +134,16 @@
     // This advices the java compiler to ignore all loggings
     public static final boolean DEBUG = false;
 
+    {
+	Properties prop = new Properties();
+	URL file = getClass().getResource("/index.properties");
+
+	if (file != null) {
+	    InputStream fr = new FileInputStream(file.getFile());
+	    prop.load(fr);
+	    this.version = prop.getProperty("lucene.index.version");
+	};
+    };
 
     public KorapIndex () throws IOException {
         this((Directory) new RAMDirectory());
@@ -175,6 +185,9 @@
 	this.config = new IndexWriterConfig(Version.LUCENE_CURRENT, analyzer);
     };
 
+    public String getVersion () {
+	return this.version;
+    };
 
     public void close () throws IOException {
 	this.closeReader();
@@ -357,7 +370,9 @@
      * @param field The field containing the textual data and the annotations.
      * @param type The type of meta information, e.g. "documents" or "sentences".
      */
-    public long numberOf (KorapCollection collection, String field, String type) throws IOException {
+    public long numberOf (KorapCollection collection,
+			  String field,
+			  String type) throws IOException {
 	// Short cut for documents
 	if (type.equals("documents")) {
 	    if (collection.getCount() <= 0) {
@@ -516,6 +531,9 @@
 
 	KorapMatch match = new KorapMatch(idString, includeHighlights);
 
+	if (this.getVersion() != null)
+	    match.setVersion(this.getVersion());
+
 	// Create a filter based on the corpusID and the docID
 	BooleanQuery bool = new BooleanQuery();
 	bool.add(new TermQuery(new Term("ID",       match.getDocID())),    BooleanClause.Occur.MUST);
@@ -836,6 +854,9 @@
 	    ks.rightContext.getLength()
 	);
 
+	if (this.getVersion() != null)
+	    kr.setVersion(this.getVersion());
+
 	HashSet<String> fieldsToLoadLocal = new HashSet<>(fieldsToLoad);
 	fieldsToLoadLocal.add(field);
 
@@ -1000,8 +1021,7 @@
 		};
 
 		// Benchmark till now
-		if (i >= kr.itemsPerPage() &&
-		    kr.getBenchmarkSearchResults().length() == 0) {
+		if (kr.getBenchmarkSearchResults() == null) {
 		    t2 = System.nanoTime();
 		    kr.setBenchmarkSearchResults(t1, t2);
 		};
@@ -1017,7 +1037,7 @@
 
 	    t1 = System.nanoTime();
 	    kr.setBenchmarkHitCounter(t2, t1);
-	    if (kr.getBenchmarkSearchResults().length() == 0) {
+	    if (kr.getBenchmarkSearchResults() == null) {
 		kr.setBenchmarkSearchResults(t2, t1);
 	    };
 
diff --git a/src/main/java/de/ids_mannheim/korap/KorapMatch.java b/src/main/java/de/ids_mannheim/korap/KorapMatch.java
index a99813b..dca773a 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapMatch.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapMatch.java
@@ -55,6 +55,7 @@
 	       potentialEndPosChar   = -1;
 
     private String error = null;
+    private String version;
 
     // TEMPRARILY
     @JsonIgnore
@@ -273,6 +274,18 @@
     };
 
     @JsonIgnore
+    public void setVersion (String version) {
+	this.version = version;
+    };
+
+    @JsonIgnore
+    public String getVersion () {
+	if (this.version == null)
+	    return null;
+	return "lucene-backend-" + this.version;
+    };
+
+    @JsonIgnore
     public int getStartPos() {
 	return this.startPos;
     };
@@ -1097,6 +1110,9 @@
 	context.put("right", rightContext);
 	json.put("context", context);
 
+	if (this.version != null)
+	    json.put("version", this.getVersion());
+
 	try {
 	    return mapper.writeValueAsString(json);
 	}
diff --git a/src/main/java/de/ids_mannheim/korap/KorapResult.java b/src/main/java/de/ids_mannheim/korap/KorapResult.java
index 7f4cf54..68ddac6 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapResult.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapResult.java
@@ -34,9 +34,10 @@
     private boolean leftTokenContext,
 	            rightTokenContext;
 
-    private String benchmarkSearchResults = "",
-	           benchmarkHitCounter = "0";
+    private String benchmarkSearchResults,
+	           benchmarkHitCounter;
     private String error = null;
+    private String version;
 
     private JsonNode request;
 
@@ -109,11 +110,24 @@
 	return this.totalResults;
     };
 
+
     @Deprecated
     public int totalResults () {
 	return this.totalResults;
     };
 
+    @JsonIgnore
+    public void setVersion (String version) {
+	this.version = version;
+    };
+
+    @JsonIgnore
+    public String getVersion () {
+	if (this.version == null)
+	    return null;
+	return "lucene-backend-" + this.version;
+    };
+    
     public short getItemsPerPage () {
 	return this.itemsPerPage;
     };
@@ -140,7 +154,9 @@
     };
 
     public void setBenchmarkSearchResults (long t1, long t2) {
-	this.benchmarkSearchResults = ((double)(t2 - t1) / 1000000000.0) + " s";
+	this.benchmarkSearchResults =
+	    (t2 - t1) < 100_000_000 ? (((double)(t2 - t1) * 1e-6) + " ms") :
+	    (((double)(t2 - t1) / 1000000000.0) + " s");
     };
 
     public String getBenchmarkSearchResults () {
@@ -148,7 +164,9 @@
     };
 
     public void setBenchmarkHitCounter (long t1, long t2) {
-	this.benchmarkHitCounter = ((double)(t2 - t1) / 1000000000.0) + " s";
+	this.benchmarkHitCounter =
+	    (t2 - t1) < 100_000_000 ? (((double)(t2 - t1) * 1e-6) + " ms") :
+	    (((double)(t2 - t1) / 1000000000.0) + " s");
     };
 
     public String getBenchmarkHitCounter () {
@@ -193,6 +211,9 @@
 	context.put("right", rightContext);
 	json.put("context", context);
 
+	if (this.version != null)
+	    json.put("version", this.version);
+
 	try {
 	    return mapper.writeValueAsString(json);
 	}
diff --git a/src/main/resources/index.properties b/src/main/resources/index.properties
new file mode 100644
index 0000000..fa1fd47
--- /dev/null
+++ b/src/main/resources/index.properties
@@ -0,0 +1 @@
+lucene.index.version = ${project.version}
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 c1855da..48d6815 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
@@ -290,5 +290,7 @@
 
 	assertEquals("totalResults", 1, kr.totalResults());
 	assertEquals("SnippetBrackets (0)", "... ca[{1:ba{2:c}}]", kr.match(0).snippetBrackets());
+
+	//	System.err.println(kr.toJSON());
     };
 };
diff --git a/src/test/resources/index.properties b/src/test/resources/index.properties
new file mode 100644
index 0000000..fa1fd47
--- /dev/null
+++ b/src/test/resources/index.properties
@@ -0,0 +1 @@
+lucene.index.version = ${project.version}
