Of course if the index name / path changes, we are out of luck to purge the old data. But that's not what would concern me most. What would concern me most is the fact that an index in use by Hibernate Search contains stale data. If one does purgeAll(A.class, B.class) and that the index metadata is complete and the index contains only A and B (supposedly), we could do an aggressive purge and remove all the data. That could be a global option to enable this aggressive optimization or not.
Thoughts?
|