fix server function searchIndex