Author: nextgens
Date: 2008-08-15 19:05:51 +0000 (Fri, 15 Aug 2008)
New Revision: 21915

Modified:
   trunk/plugins/XMLLibrarian/XMLLibrarian.java
Log:
XMLLibrarian: maybe fix Coo's problem with big indexes 
(http://code.bulix.org/tn418a-68027?raw)

Modified: trunk/plugins/XMLLibrarian/XMLLibrarian.java
===================================================================
--- trunk/plugins/XMLLibrarian/XMLLibrarian.java        2008-08-15 18:53:13 UTC 
(rev 21914)
+++ trunk/plugins/XMLLibrarian/XMLLibrarian.java        2008-08-15 19:05:51 UTC 
(rev 21915)
@@ -94,6 +94,8 @@
        private String prefix_match;
        private int prefix;
        private boolean test;
+       
+       private static final long MAX_SIZE = 2 * 1024 * 1024 * 1024; //2GB
        /**
         * indexList contains the index folders 
         * each folder has a name and a list of indices added to that folder
@@ -740,6 +742,8 @@
                //search for the word in the given subIndex
                fileuris = new Vector();
                HighLevelSimpleClient hlsc = pr.getHLSimpleClient();
+               hlsc.setMaxIntermediateLength(MAX_SIZE);
+               hlsc.setMaxLength(MAX_SIZE);
                try{
                        FreenetURI u = new FreenetURI(DEFAULT_INDEX_SITE + 
"index_"+subIndex+".xml");



Reply via email to