how us your files attached to the documents? The attachment search only works for files that are connected to pages through one of the following methods:
- Attachment files added to pages through fields with the Data type set to File or Attachments in the page type definition
- Attachments uploaded in the Pages application on the Properties -> Attachments tab of pages
See the doc