You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Tim Smith (JIRA)" <ji...@apache.org> on 2009/09/17 16:16:57 UTC

[jira] Created: (LUCENE-1915) Add static openInput(File,...) methods to all FSDirectory implementations

Add static openInput(File,...) methods to all FSDirectory implementations
-------------------------------------------------------------------------

                 Key: LUCENE-1915
                 URL: https://issues.apache.org/jira/browse/LUCENE-1915
             Project: Lucene - Java
          Issue Type: Wish
          Components: Store
            Reporter: Tim Smith


It would be really useful if NIOFSDirectory and MMapDirectory had static methods for opening an input for arbitrary Files
SimpleFSDirectory should likewise have a static openInput(File) method in order to cover all basis (right now, SimpleFSIndexInput only has protected access

This allows creating a custom FSDirectory implementation that can use any criteria desired to determine what Input implementation to use for opening a file.

I know the FileSwitchDirectory provides some ability to do this, however that locks the selection criteria down to only the file extension in use
also, the FileSwitchDirectory approach seems to want to have each directory at different paths (as list() methods just cat the directory listings of the sub directories, which could cause havoc if both sub directories point to the same FS path?)

opening up these static openInput() methods would allow creating a custom FS store implementation that would could for instance mmap files of a particular type and size and use NIO for other files, and mabye even use the SimpleFS input for a third category of files. Could also then apply different buffer sizes to different files, perform RAM caching of particular inputs, etc


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org