Issue Bug Closed

#94273FileSearchDemand / searchFiles searches in sha1-hash

Stefan Weißwange 06/02/21, 18:35 updated 09/07/21, 07:33

Description

I search for files in a storage via

$searchDemand = FileSearchDemand::createForSearchTerm($searchTerm);
$searchResults = $folder->searchFiles($searchDemand);
One $searchTerm is ‘d4729’, which returns two results:
  • the file I want: ‘d4729lbr.pdf’
  • one file I dont want: ‘d1566raa.pdf’

I checked the second file, which obviously has another name. The content of this file does not contain the $searchTerm. So I checked sys_file and found the $searchTerm in the sha1-hash (7071623199af3f7564ec1db8e5 d4729 4c339b2aa).

I dont think the search should check the sha1-hash as a default-setting while searching in a storage.

Reviews 2