It could make sense not to delete everything of ES:
With the ES service running, open:
http://localhost:9200/_cat/indices?v
Log in and then write down the UUID of ".security-7" and save the corresponding directory to a safe place:
"..elasticsearch7.17.13-data\nodes\0\indices\<UUID>
After step 2, restore the directory and only then carry out step 3
-> this ensures that you can log in to ES with your usual data
but saved searches are also gone.
Operation to perform reindex should be:
SELECT * from dms:sysobject
(everything)