Fix search api bug.