remove null and empty terms from the index and search