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

Hoss Man commented on LUCENE-5663:
----------------------------------

bq. ...This does not use NIOFSDir...

Except that it might: that's the point, isn't it? that it's a factory method 
that gives you the best FSDir impl supported on your system?

Even if you see it in the method list for NIOFSDirectory, and even if you 
ignore the method javadocs, the return type should tip you off that you aren't 
_garunteed_ to get an NIOFSDir back.

bq. We can have FSDirectoryFactory,...

I'm not convinced a new factory class is really neccessary -- It seems like it 
would probably be enough just to rename the method to make it more obvious that 
this method will return _some_ FSDirectory that we recommend based on your OS...

{code}public static FSDirectory openRecommendedFSDirectory(File) throws 
IOException{code}



> Fix FSDirectory.open API
> ------------------------
>
>                 Key: LUCENE-5663
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5663
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>
> Spinoff from LUCENE-5658
> {quote}
> This does not use NIOFSDir! open() is a static factory method on FSDirectory, 
> just inherited to NIOFSDirectory. 
> {quote}
> I think its confusing we have this method on FSDirectory, so its visible in 
> subclasses. We should at least consider doing this in another way so its not 
> confusing.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to