Structural similarity determines search time and detection probability