Re-introduce krill.context.max.char support

Change-Id: I75c0654af1fddfe6d1c5ba1842b9f0ce5b6b0c8a
diff --git a/src/main/java/de/ids_mannheim/korap/util/KrillProperties.java b/src/main/java/de/ids_mannheim/korap/util/KrillProperties.java
index 6a2485e..d88e26b 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KrillProperties.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KrillProperties.java
@@ -105,6 +105,7 @@
 
         // EM: not implemented yet
         // String maxCharContextSize = prop.getProperty("krill.context.max.char");
+        String maxCharContextSize = prop.getProperty("krill.context.max.char");
         String defaultSearchContextLength = prop.getProperty("krill.search.context.default");
         String maxTextSizeValue = prop.getProperty("krill.index.textSize.max");
 
@@ -117,10 +118,10 @@
                 KrillProperties.maxTokenContextSize = Integer
                         .parseInt(maxTokenContextSize);
             }
-//            if (maxCharContextSize != null) {
-//                KrillProperties.maxCharContextSize = Integer
-//                        .parseInt(maxCharContextSize);
-//            }
+            if (maxCharContextSize != null) {
+                KrillProperties.maxCharContextSize = Integer
+                        .parseInt(maxCharContextSize);
+            }
             if (defaultSearchContextLength != null) {
                 KrillProperties.defaultSearchContextLength = Integer
                         .parseInt(defaultSearchContextLength);
diff --git a/src/main/resources/krill.properties.info b/src/main/resources/krill.properties.info
index 081d04b..bbe38d5 100644
--- a/src/main/resources/krill.properties.info
+++ b/src/main/resources/krill.properties.info
@@ -20,7 +20,7 @@
 #
 # krill.match.max.token = 5
 #
-##  Maximum number (i.e. length) of tokens to be retrievable.
+##  Maximum number (i.e. length) of tokens to be retrievable in a match.
 ##  Matches longer than that will be cut.
 ##  Defaults to 50
 
@@ -69,5 +69,11 @@
 ## Note: Only token-based contexts are affected; character-based contexts
 ## are currently not adjusted by this feature.
 
-
-
+# krill.context.max.char =
+#
+## Maximum number of characters to be retrieved (left and right) of a match
+## when the client requests character-based context.
+## Character-based contexts are independent of token-based contexts:
+## the client chooses one or the other per request. When character context
+## is used, token-based maxShrink adjustment does NOT apply.
+## Defaults to 500