Revert "Remove meaningless query call on search()"

This reverts commit ca6cd6674abedbe0a038cbc61d65298ab5c25de7.