-Fwd: svn commit: r1350178 - /incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs
Itamar Syn-Hershko 2012-06-14, 10:39
This is a proposed change
I got really tired of writing unnecessary code all the time
when opening FSDirectory
---------- Forwarded message ----------
From: <[EMAIL PROTECTED]>
Date: Thu, Jun 14, 2012 at 1:19 PM
Subject: svn commit: r1350178 - /incubator/
To: [EMAIL PROTECTED]
Date: Thu Jun 14 10:19:13 2012
New Revision: 1350178
Allow for opening FSDirectory with a string
A proposed change - I'm tired of creating a DirInfo object all the time,
doesn't really add any value
=============================================================================--- incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs Thu Jun 14
@@ -210,6 +210,31 @@ namespace Lucene.Net.Store
+ /// <summary>Creates an FSDirectory instance, trying to
+ /// best implementation given the current environment.
+ /// The directory returned uses the <see
+ /// <p/>Currently this returns <see
cref="SimpleFSDirectory" /> as
+ /// NIOFSDirectory is currently not supported.
+ /// <p/><b>NOTE</b>: this method may suddenly change which
+ /// implementation is returned from release to release, in
+ /// the event that higher performance defaults become
+ /// possible; if the precise implementation is important to
+ /// your application, please instantiate it directly,
+ /// instead. On 64 bit systems, it may also good to
+ /// return <see cref="MMapDirectory" />, but this is
+ /// because of officially missing unmap support in Java.
+ /// For optimal performance you should consider using
+ /// this implementation on 64 bit JVMs.
+ /// <p/>See <a href="#subclasses">above</a>
+ /// </summary>
+ public static FSDirectory Open(string path)
+ return Open(new DirectoryInfo(path), null);
/// <summary>Creates an FSDirectory instance, trying to pick
/// best implementation given the current environment.