Possible error in Dataset elasticsearch

I am creating a text index using elasticsearch on a Dataset and I am getting the following error when I search it:

It appears that although the index is a text index (created with add_elasticsearch_index) somehow when I search using a string as a query it is expecting array indices.
Has anyone encountered this issue?

/usr/local/lib/python3.7/dist-packages/nlp/search.py in (.0)
552 self._check_index_is_initialized(index_name)
553 scores, indices = self.search(index_name, query, k)
→ 554 return NearestExamplesResults(scores, self[[i for i in indices if i >= 0]])
555
556 def get_nearest_examples_batch(

TypeError: ‘>=’ not supported between instances of ‘str’ and ‘int’