You mean an opened IndexOutput would write its output to two (or more) different places? So you could "write through" a RAMDir down to an FSDir? (This way both the RAMDir and FSDir have a copy of the index).
yes, so if you register more than one directory for "index files", then the IndexOutput for the directory would dispatch to an IndexOutput for both sub directories
then, the IndexInput would only be opened on the "primary" directory (for instance, the RAM directory)
This will allow extremely fast searches, with the persistence of a backing FSDirectory
coupled with then having a set of directories for the "Stored Documents", then allows:
- RAM directory search speed
- All changes persisted to disk
- Documents Stored (and retrieved from disk) (or optionally retrieved from RAM)