Adding indexes on existing entities.

#1

Is it safe to add indexes on an existing entity class?

Thanks.

#2

Safe, but to enable the new index you will have to rebuild it, currently using the Doctor.

Before running the Doctor make sure that the index is registered in the database by opening the database when it has access to the new index definition (either annotation in class or xml), or run the Doctor with this available in the classpath.

Update: Starting ObjectDB 2.6.6 new indexes are automatically built and activated in the background.

ObjectDB Support
#3

OK DB needs to be open once with index registered and then rebuilt with Doctor. Thank you or answering the question i failed to formulate properly.

Reply