improved search model [skip ci]