On 1 March 2012 13:37, Guillaume Smet <guillaume.smet(a)gmail.com> wrote:
One more idea: we would like to have an API to disable Hibernate
Search temporarily.
Currently we have to start the application with a specific Spring
context configuration to do so. We would like to:
- disable Hibernate Search
- do bulk loading
- enable Hibernate Search again
- use the Mass Indexer to index all the loaded entities
I don't dislike the concept, but are you sure that is actually going
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 might be a documentation patch if there is an easy way to do so but
we haven't found it yet.
I guess the freshly committed "Indexing Interceptors" [1]
could be used for that purpose as well. Surely, API wise a global
switch might be nicer.
Sanne
1 -
http://in.relation.to/Bloggers/HibernateSearch41CR1SoftDeletes