add restartIndexing
change synchronization for database