diff --git a/import-marc.bat b/import-marc.bat
index 226d290f0b4597f4e58cc6c41e492ee02f95e850..2e09d456f52e5edd18e1dbde3dc1b801d6f98d49 100644
--- a/import-marc.bat
+++ b/import-marc.bat
@@ -46,7 +46,9 @@ rem # You may also want to add the following:
 rem # -XX:+UseParallelGC
 rem # -XX:+AggressiveOpts
 rem ##################################################
+if not "!%INDEX_OPTIONS%!"=="!!" goto indexoptionsfound
 set INDEX_OPTIONS=-Xms512m -Xmx512m -DentityExpansionLimit=0
+:indexoptionsfound
 
 rem ##################################################
 rem # Set SOLRCORE
diff --git a/import-marc.sh b/import-marc.sh
index af1834876659c3406350c6cc61fc3338f1ce83ea..2031abd2ddcaa9a362073d804cbdfd495bc19e42 100755
--- a/import-marc.sh
+++ b/import-marc.sh
@@ -49,7 +49,10 @@ fi
 # -XX:+UseParallelGC
 # -XX:+AggressiveOpts
 ##################################################
-INDEX_OPTIONS='-Xms512m -Xmx512m -DentityExpansionLimit=0'
+if [ -z "$INDEX_OPTIONS" ]
+then
+  INDEX_OPTIONS='-Xms512m -Xmx512m -DentityExpansionLimit=0'
+fi
 
 
 ##################################################