Implement global search, but there is a bug