Fixed search function to allow ignoring dates.