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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to