With the extended text search, you can apply text or keyword search on the filenames or on the comments attached to the text, image, and video file attachments to retrieve the right (desired) file attachment.
While using the extended text search, you can enable the toggle switch to view the precise search results filtered out from the chat history or disable it to view the highlighted search results of the keyword/text from the entire chat history.