fix `UnicodeDecodeError` when querying index with non-Latin characters