Ability to disable automatic indexing programmatically, ideally per-index, at the application level (all sessions)

Description

It is very resticitive in an application that has multiple indexes to only allow the disabling of automatic indexing on an application wide level (or at least SessionFactory wide...). I can see it being very useful to have auto indexing on a per index basis.

Also, it would be nice to be able to turn auto indexing off and on programmatically using something like

and

Activity

Show:

Yoann Rodière October 12, 2022 at 7:24 AM

Related feature request and (hackish) solution until this feature is implemented:

Sanne Grinovero January 7, 2015 at 4:59 PM

I think these use cases are very reasonable so I'll optimistically schedule this to be done for version 5.1
Thanks for reminding of this old issue!

Chris Hardin January 7, 2015 at 3:24 PM

I need to be able to do this too...I have a process that runs and sometimes I do a bulk insert and I need the insert to run quickly and then do the mass indexing later but under normal circumstances I want the event indexing to take place. The Event based indexing is causing my bulk insert to take a lot longer so if I could turn it off programmatically and then reenable it later, it would be extremely useful.

Remy Gendron May 13, 2010 at 5:26 PM

I found this issue while searching for a way to temporarily disable the indexing. My use case is that the app can generate test data itself at startup when needed. Transparent indexing dramatically slows down this process as batch updates cannot be used during this process (hierarchies are being created). The app also does a partial, manual re-indexing of changed entities since the app was last stopped to catch external updates to the database while it was down.

I would really much like the ability to disable transparent indexing while my test dataset is being generated. Thereafter, the partial re-indexing will occur and batch index these new entities.

Thank you for this great piece of software.

Emmanuel Bernard March 13, 2008 at 9:38 PM

You will need to give me good use cases for both per index indexing and programmatic indexing.
There are strong reasons why this is not the case today.

Fixed

Details

Assignee

Reporter

Components

Sprint

Fix versions

Priority

Created March 13, 2008 at 8:31 PM
Updated June 2, 2023 at 1:33 PM
Resolved May 9, 2023 at 2:16 PM