eroy4u wrote:
I want to asynchronous update the index at regular time intervals, e.g. 1 time every day,
so I have to disable the automatic index after the transaction is committed, how can i do that?
Depends what you want to do:
- if you want to index changes made by hibernate but apply them only once a day, your best bet is to use the JMS back end. You just have to enable your Message Driven Bean to process the messages once a day. There is virtually no overhead in using this method for your front end.
- if you want to read data from the database and index what has changed once a day, you can implement a method that retrieve the appropriate data and run session.index(object) (check batch index in the doc). I expect to enhance this area in 3.1 (ie having the ability to do this automatic indexing for you)
But once again, unless the Db is updated behind Hibernate's back, 1 is preferable to 2, I think.