On Thu, Mar 1, 2012 at 2:55 PM, Sanne Grinovero <sanne(a)hibernate.org> wrote:
I don't dislike the concept, but are you sure that is actually
to be faster?
If you have the bulk loading trigger async indexing events, it won't
be much different than what the MassIndexer would do, with the
difference it will need to re-load all the data again. Sounds more
efficient to index the entities when you have them in memory already,
without having to reload them from the database.
I guess in your case "bulk loading" might finish a bit earlier, but
overall it's much more I/O work.
It's definitely faster to import then mass index on our development boxes.
Moreover, when you are working on bulk loading, it's interesting to be
as fast as possible on the insert side to be able to validate that all
the data loaded are valid.
I guess the freshly committed "Indexing Interceptors" 
could be used for that purpose as well. Surely, API wise a global
switch might be nicer.
You're reading my mind.