add search function by code type