(gmail seem to have replaced their dns, sorry if this mail was
repeatedly sent to the list.)


14 aug 2007 kl. 01.08 skrev Chris Hostetter:

i agree with you that it would be nice if Factory patterns were used more
(and more consistently) ... but i'm not sure if Directory is the right
place to put them .. in theor a Directory is a purely abstract data
storage object that doesn't evne know it contains an index.

Related, I would also like to see an abstract or interface reader and
writer that has nothing to do with Directory.

(Ceterum censeo, Carthago delenda est.)

I do like the spirit of your patch -- but I don't see any reason not to go
about solving the same problem using IndexReaderFactory and
IndexWriterFactory interfaces, with things like IndexReader.open
delegating to the "default" IndexReaderFactory (specified by a system
property or something) for backwards compatibility.

The patch is not my limit. It was just something I posted to show in code
what it is I'm looking for.

As far as I know this is an ego-thing as I'm the only one that "require"
this feature. It would make it much simpler for me to ensure that my
ad hoc store pass the same tests as the Directory. All the decorative
things I've posted have been nothing but ideas on what else one could
use it for.

With factories in place I would feel more confident refactoring all tests to abstract classes with one implementation per store. Or something smarter. Huge job, but in the end it would make mine and future store implementors
life much simpler.


--
karl

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to