encode search query