Fix #1503 : Avoid query error in case search engine index is broken