lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Digy" <>
Subject RE: Lucene.Net 2.4.0
Date Fri, 31 Jul 2009 17:44:59 GMT
	I think that method can be used for FSDirectory.sync
        public static extern int
FlushFileBuffers(Microsoft.Win32.SafeHandles.SafeFileHandle SafeFileHandle);

        public static void Sync(FileStream fs)
            if (FlushFileBuffers(fs.SafeFileHandle) == 0)
                throw new SyncFailedException();

        public class SyncFailedException : Exception


-----Original Message-----
From: Doug Sale [] 
Sent: Friday, July 31, 2009 7:06 PM
Subject: Lucene.Net 2.4.0

Regarding the 2.4.0 port:

On Tuesday, I checked in the port that I completed earlier this year.
We've been integrating it into a number of systems at MySpace (thanks
to Bala Rangaraj and Michael Garski for catching and fixing a handful
of bugs).

The initial check-in lacks a few classes/features that exist in the
Lucene Java 2.4.0 release.


1) Implement Lucene.Net.Store.NIOFSDirectory.cs

This is a Java subclass of FSDirectory that allows multiple threads to
read from a single file without blocking each other.  Write behavior
is inherited from FSDirectory.  If anyone would like to take a stab at
this, please be my guest.

2) File Descriptor syncing in FSDirectory.cs

FSDirectory.Sync(string) is supposed to sync the underlying file
descriptor, flushing all downstream buffers.  I'm not sure how to
accomplish this is C#, and this code needs to be reviewed/fixed/nuked.

3) Lucene.Net.Search.TimeLimitedCollector.cs

I have implemented this class and I am currently working on the unit test.

4) Weak References

I plan to work on these later today.

- Lucene Java uses weak references
- Lucene.Net is using 'regular' references

- Lucene Java utilizes java.util.WeakHashMap
- Lucene.Net is not using a data structure with weak references

5) Lucene.Net.Store.CheckSumIndex[Input|Output].cs

These, I completed and checked in on Wednesday.  They use, to the best
of my knowledge, the same CRC32 algorithm as the classes
(they have to, for index compatibility between Lucene.Net and Lucene
Java.)  I provided a new test, TestSupportClass.cs, to verify the
results against a checksum generated in Java.


View raw message