[ 
https://issues.apache.org/jira/browse/LUCENE-1451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647047#action_12647047
 ] 

Yonik Seeley commented on LUCENE-1451:
--------------------------------------

The actual class used for making new instances of Directory is 
FSDirectory.IMPL, set via the system property 
"org.apache.lucene.FSDirectory.class".

It seems like we should make it  possible to create multiple FSDirectory 
implementations of different types in the same JVM.
The simplest workaround would be to create a
  protected static FSDirectory getDirectory(File file, LockFactory lockFactory, 
Class impl)
Subclasses could implement their own getDirectory calls that pass down the 
appropriate class.

Not the most elegant solution if one were starting from scratch, but it seems 
like it would be completely backward compatible, while allowing 
NIOFSDirectory.getDirectory() to do what it looks like it should do.

> Can't create NIOFSDirectory w/o setting a system property
> ---------------------------------------------------------
>
>                 Key: LUCENE-1451
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1451
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Yonik Seeley
>            Priority: Minor
>
> NIOFSDirectory.getDirectory() returns a FSDirectory object

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to