SOLUTION!
The root cause was an outdated PDF iFilter that was causing Windows Search to take a really, really long time when indexing the contents of PDF files, including PDF attachments in Outlook. (IFilters are kind of like invisible plugins that allow Windows Search to parse and index the contents of various file types, like Word files, Excel spreadsheets, and PDFs. My older version of Adobe Acrobat Pro, which was one of the first programs I installed on my new Windows 11 computer, installed an iFilter that doesn't play well with 64-bit versions of Windows 10 or 11, overwriting the native Windows PDF iFilter.)
My clue came from running Sysinternals Process Monitor and observing that ReadFile operations by SearchProtocolHost.exe on PDF files were lasting on the order of many seconds, rather than fractions of a second. (See https://superuser.com/a/784117 for details on using Process Monitor for this purpose.)
There are three solutions mentioned around the web. The first solution was successful for me, so I didn't try the second or third.
SOLUTION 1: INSTALL AN UPDATED PDF IFILTER FROM ADOBE (successful for me):
Download a newer (Acrobat 11.0.4) version of Adobe's PDF iFilter from ftp.adobe.com/pub/adobe/acrobat/win/11.x/PDFFilter64Setup.msi and install it. Restart the Windows Search service (or reboot the computer), and then rebuild the Search index. (You can confirm that you've installed an updated iFilter by looking in Indexing Options > Advanced > File Types > PDF; the outdated iFilter appears as "Acrobat Pro Filter," while the updated one appears as "PDF Filter.")
Sources: https://helpx.adobe.com/acrobat/kb/pdf-search-breaks-110-install.htmland https://community.adobe.com/t5/acrobat-discussions/is-the-ifilter-still-necessary-after-updateing-adobe-dc-to-64bit/m-p/13875932
Note: Acrobat 11 is, by now, also quite old. I don't know how long the "new" iFilter will continue to work, but it's working for me now on Windows 11 Pro 23H2 64-bit. If Windows Search breaks again in future, my first step would be to try solutions 2 and 3 below.
SOLUTION 2: RESTORE THE NATIVE WINDOWS PDF IFILTER (I didn't need to try this):
In the Registry, confirm that HKCR.pdf\PersistentHandler = {F6594A6D-D57F-4EFD-B2C3-DCD9779E382E}, which is the Adobe iFilter. (It's also the CLSID for the updated Adobe iFilter, so if solution 1 was successful, leave it alone.) Restore the native Windows iFilter by changing this entry to {1AA9BF05-9A97-48c1-BA28-D9DCE795E93C}. Restart the Windows Search service or reboot, then rebuild the Search index.
Sources: https://helpx.adobe.com/acrobat/kb/pdf-search-breaks-110-install.htmland https://www.tecchannel.de/a/die-suche-in-pdfs-unter-windows-8-reparieren,2051114
SOLUTION 3: INSTALL A 3RD-PARTY PDF IFILTER OVER ADOBE'S (I didn't try this either):
If desired, a 3rd-party iFilter can be used instead of Adobe's or Microsoft's. After restoring the Windows iFilter with method 2, install (or re-install) a 3rd-party PDF program like Sumatra, then look at the CLSID or the Advanced Indexing Options entry to confirm that a new iFilter was installed.
Source: https://helpx.adobe.com/acrobat/kb/pdf-search-breaks-110-install.html
After applying solution #1 and restarting the Windows Search process and rebuilding the index, I could see in Process Monitor that my PDF (and other) files were being read by SearchProtocolHost.exe and scrolling by even quicker than I could read. That's normal! After an overnight run, the indexing that had previously been running so slow that it would have taken a century to complete (literally!) was finished by morning.
[ and https://www.tenforums.com/tutorials/93655-enable-disable-indexer-backoff-windows.html (for Policy)
- To stop Windows Search from indexing Outlook messages (and use built-in, much slower, native Outlook search), even if only temporarily to allow Windows to finish indexing files before doing Outlook messages, set this Registry entry to 1, then restart the Windows Search service:
- HKLM\SOFTWARE\Microsoft\Windows Search\PreventIndexingOutlook (DWORD) = 1
- HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search\PreventIndexingOutlook (DWORD) = 1
(To turn Windows Search indexing for Outlook messages back on, reset the entries to 0.)
The Policy entry can instead be done through the Group Policy Editor:
- Computer Configuration\Administrative Templates\Windows Components\Search\Prevent indexing Microsoft Office Outlook = Enabled
(default is Not Configured).
Sources: https://winaero.com/a-search-bug-prevents-windows-11-from-indexing-outlook-mail/and https://support.microsoft.com/en-us/topic/outlook-search-might-not-display-recent-emails-on-windows-11-22124db2-e7c6-48ec-953d-790378cc49db
- To see the indexer's progress, use Sysinternals Procmon64 (https://learn.microsoft.com/en-us/sysinternals/downloads/procmon, or download directly from https://download.sysinternals.com/files/ProcessMonitor.zip).
- INCLUDE filters: (Process Name = SearchProtocolHost.exe), (Operation = ReadFile), (Event Class = File System)
- EXCLUDE filters: (Result = FAST IO DISALLOWED), (Detail CONTAINS Non-cached), (Path BEGINS WITH c:\Windows), (Path BEGINS WITH c:\ProgramData)
Expect a long, running list of files being read for indexing, scrolling as fast as you can read. Large files will repeat, but their offset should be changing. If nothing appears after a while, if it stays on each file longer than a fraction of a second, or if it appears to be stuck in a loop on the same file at the same offset, something is wrong.
Source: https://superuser.com/a/784117
I hope this is helpful to others with Windows Search indexing problems, but of course I can't guarantee that this will work for anybody else, and changing anything in the Windows Registry or Group Policy or installing 3rd-party software always has the potential to wreak havoc on a computer. Follow these instructions at your own risk, and make backups first. System Restore is your friend!