Author: pfg Date: Sun Dec 9 20:21:43 2012 New Revision: 1419136 URL: http://svn.apache.org/viewvc?rev=1419136&view=rev Log: Lucene update.
Restore previous comment now that long_path.patch is back. IndexWriter.MaxFieldLength.LIMITED caused terms to be silently dropped after the 10,000th term in a field. Switch to UNLIMITED which doesnt casue this to happen. Suggested by: Steve Rowe Modified: openoffice/trunk/main/l10ntools/source/help/HelpIndexerTool.java Modified: openoffice/trunk/main/l10ntools/source/help/HelpIndexerTool.java URL: http://svn.apache.org/viewvc/openoffice/trunk/main/l10ntools/source/help/HelpIndexerTool.java?rev=1419136&r1=1419135&r2=1419136&view=diff ============================================================================== --- openoffice/trunk/main/l10ntools/source/help/HelpIndexerTool.java (original) +++ openoffice/trunk/main/l10ntools/source/help/HelpIndexerTool.java Sun Dec 9 20:21:43 2012 @@ -43,6 +43,15 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.util.Date; +/** + When this tool is used with long path names on Windows, that is paths which start + with \\?\, then the caller must make sure that the path is unique. This is achieved + by removing '.' and '..' from the path. Paths which are created by + osl_getSystemPathFromFileURL fulfill this requirement. This is necessary because + lucene is patched to not use File.getCanonicalPath. See long_path.patch in the lucene + module. + */ + public class HelpIndexerTool { public HelpIndexerTool() @@ -176,7 +185,7 @@ public class HelpIndexerTool { Date start = new Date(); Analyzer analyzer = aLanguageStr.equals("ja") ? (Analyzer)new CJKAnalyzer(Version.LUCENE_29) : (Analyzer)new StandardAnalyzer(Version.LUCENE_29); - IndexWriter writer = new IndexWriter( NIOFSDirectory.open(aIndexDir), analyzer, true, IndexWriter.MaxFieldLength.LIMITED ); + IndexWriter writer = new IndexWriter( NIOFSDirectory.open(aIndexDir), analyzer, true, IndexWriter.MaxFieldLength.UNLIMITED ); if( !bExtensionMode ) System.out.println( "Lucene: Indexing to directory '" + aIndexDir + "'..." ); int nRet = indexDocs( writer, aModule, bExtensionMode, aCaptionFilesDir, aContentFilesDir );