Add functional search tests
Merge branch 'master' into unstable