Ensures a large enough search buffer for all modules. Patch from mwtalbert. Index: main/src/modules/swmodule.cpp =================================================================== --- main.orig/src/modules/swmodule.cpp 2009-08-29 22:44:21.000000000 -0700 +++ main/src/modules/swmodule.cpp 2009-08-29 23:13:23.000000000 -0700 @@ -496,7 +496,7 @@ #ifdef USELUCENE if (searchType == -4) { // lucene //Buffers for the wchar<->utf8 char* conversion - const unsigned short int MAX_CONV_SIZE = 2047; + const unsigned int MAX_CONV_SIZE = 1024 * 1024; wchar_t wcharBuffer[MAX_CONV_SIZE + 1]; char utfBuffer[MAX_CONV_SIZE + 1]; @@ -980,6 +980,7 @@ SWKey *searchKey = 0; SWKey textkey; SWBuf c; + const unsigned int MAX_CONV_SIZE = 1024 * 1024; // turn all filters to default values @@ -1027,6 +1028,7 @@ ramDir = new RAMDirectory(); coreWriter = new IndexWriter(ramDir, an, true); + coreWriter->setMaxFieldLength(MAX_CONV_SIZE); @@ -1056,7 +1058,6 @@ SWBuf proxLem; SWBuf strong; - const short int MAX_CONV_SIZE = 2047; wchar_t wcharBuffer[MAX_CONV_SIZE + 1]; char err = Error();