lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: FSDirectory and creating directory
Date Wed, 04 Feb 2015 18:20:57 GMT
> On Wed, Feb 4, 2015 at 1:12 PM, Uwe Schindler <> wrote:
> > Hi Robert,
> >
> > I am fine with any of your comments. We can move this issue to later
> releases, I just want that FSDirectory and its subclasses to document that
> they create the directory on its ctor if it does not yet exist. Please understand
> that I want to figure out if this could cause "human" issues, because I know
> people are always complaining about this shit. And I also wanted to be sure
> this causes no problems with read-only filesystems. People will for sure
> complain if they just want to open an indexreader and suddenly the
> FSDirectory complains about "I cannot write" instead of "Directory does not
> exist". I understand the reason behind this change: we want the "real"
> (canonical path), so NativeFSLockingFactory's stupid internal Set<Path>
> works correctly. No worry, I don’t want to change that for 5.0 - only
> document it! But we can think in later Lucene releases to go back to not
> creating the directory on front under read-only conditions (opening an
> IndexReader).
> >
> > Should I add those Javadocs, costs me not much, I just wanted to check this
> out before?  In fact I would move the comment you added to the Javadocs of
> ctor and open() with an additional sentence.
> I don't mind if you change the javadocs, or handle exception from
> Files.createDirectories() differently (e.g. in case creation fails).
> Just remember, people will for sure complain if they just want to open an
> indexwriter and make a new index and suddenly FSDirectory complains
> about "Directory does not exist" instead of "I cannot write"
> :)

I will just change the Javadocs, so nobody can complain about that.
I also removed the bogus comment in 4.10 - which claimed the opposite what really happened.
This caused most trouble, because the Lucene.NET people did not understand what was going
wrong there and they tried to implement what the comment said. And to me it was also a "WTF?"
issue :-)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message