unit tets for search directive

Test Plan: test it

Reviewers: albertkang75

Differential Revision: http://178.62.60.45/D32