Add get next search key function
Merge branch 'master' into temp