Unless you put links to every particular file on a page, the filename won‘t be found by the search. Only the pages are indexed, the filenames are not.
Even if you don‘t want to search file contents, maybe you want to have a look to the docsearch-plugin:
https://www.dokuwiki.org/plugin:docsearch