Coincidentally perhaps, my iPad Pro recently upgraded to iPadOS 17 had an episode of overheating while not in use and not under charge.
This has nothing to do with re-indexing as the upgrade happened weeks ago.
It had never happened to me before.
As I said, probably a coincidence, but it made me think.