Query method in search layer.