fix error in textsearch.py