Added not-timeExceeded to the totalResult constraints.

Change-Id: I5589886571124af8e0f81c9dc4b412bb826450b6
diff --git a/Changes b/Changes
index d4f1302..32726d1 100644
--- a/Changes
+++ b/Changes
@@ -23,6 +23,7 @@
 - Changed memberUsername to member in the new member-role-addition web-service.
 - Removed user-privileges from user-group list response.
 - Added role names to user-group list
+- Added not-timeExceeded to the totalResult constraints.
 
 
 # version 0.74.1-SNAPSHOT
diff --git a/src/main/java/de/ids_mannheim/korap/core/service/SearchService.java b/src/main/java/de/ids_mannheim/korap/core/service/SearchService.java
index 5972577..8d87458 100644
--- a/src/main/java/de/ids_mannheim/korap/core/service/SearchService.java
+++ b/src/main/java/de/ids_mannheim/korap/core/service/SearchService.java
@@ -273,7 +273,9 @@
         else {
             JsonNode node = JsonUtils.readTree(result);
             totalResults = node.at("/meta/totalResults").asText();
-            if (totalResults != null && !totalResults.isEmpty()
+            boolean timeExceeded = node.at("/meta/timeExceeded").asBoolean();
+            
+            if (!timeExceeded && totalResults != null && !totalResults.isEmpty()
                     && Integer.parseInt(totalResults) > 0)
                 totalResultCache.storeInCache(hashedKoralQuery, totalResults);
         }