Fixed issues with cache search and sosl search introduced by pull request