Hi, the index is organized in segment files, which are all immutable. when changes are made, new smaller segments are created and eventually compacted in larger segments, outdated segments are eventually deleted when no IndexReader instances are referring to them anymore (very short time: time of a single query).
A nice consequence of this is that you need not care for "changed" files, just copy all files you don't have yet in the target location, and remove the ones not existing anymore. This is perfect for rsync, for example.
Finally, we have such copy routines (implementing a simple rsync-like strategy) in the code base, which is what the Master / Slave directories use to make periodic copies.
See org.hibernate.search.util.impl.FileHelper.synchronize(File, File, boolean, long)
_________________ Sanne http://in.relation.to/
|