Hi George, * DocumentsWriter.cs Since ReusableStringReader inherits from StringReader, it has a "ReadToEnd" method in fact which always returns an empty string. I faced with this problem while I was trying to write a custom analyzer and It took a lof of debugging to find out ReusableStringReader.ReadToEnd always returns an "". Instead of removing it, other methods of Stringreader should also implemented. [See https://issues.apache.org/jira/browse/LUCENENET-150]
* FSDirectory.cs The purpose of these loops are to try a few times to open the files. There are cases(I don't know why) where trying to open the files causes an AccessDenied error, and after waiting a few msecs, retrying it succeeds. A similar approach also exists in SegmentInfos(java version too) (Lucene.Net.Index.SegmentInfos.defaultGenFileRetryCount, Lucene.Net.Index.SegmentInfos.defaultGenFileRetryPauseMsec) [See https://issues.apache.org/jira/browse/LUCENENET-152] Regards, DIGY -----Original Message----- From: George Aroush [mailto:geo...@aroush.net] Sent: Saturday, December 20, 2008 4:38 AM To: lucene-net-...@incubator.apache.org; lucene-net-user@incubator.apache.org Subject: Some questions about recent patch delivery to the trunk Hi Digy, and Doug I have done a code review on the patches that were delivered to the trunk, and I have some questions: * DocumentsWriter.cs - What is ReadToEnd()? I don't see it being used from anywhere, and it doesn't exists in the Java version of Lucene. Lets remove it please. * FSDirectory.cs - The constructor FSIndexInput() and FSIndexOutput() have a loop which try to create a Descriptor / BinaryWriter object. This loop has a try / catch and loops 10 times before it gives up. There is no such logic in the Java version of Lucene; why was this added to Lucene.Net? Why 10 times but not 5, 2, 100? This bothers me since it may be hiding a real port issue. If this loop is a must, due to the way .NET works, a comment is required to explain the divergence. * TestStressIndexing2.cs - In IndexSerial(), there is a comment that reads "nonono - can't do this ..." and then the line fields.Sort(fieldNameComparator) is commented out, why? This is not the case for Java; in Java it's sorted by calling Collections.sort(fields, fieldNameComparator). - In VerifyEquals(), some new C# only code is added (for debugging?) It's best to avoid such extra code to help reduce delta(s) when working on new port. I don't know which patch introduced the above, still I consider them divergence from the Java code and should be fixed. Regards, -- George