code: def is_indexed(self, dataset):
          
          with self.index.searcher() as searcher:
              result = searcher.search(Term('vid', dataset.vid))
              return bool(result)
docs: Returns True if dataset is already indexed. Otherwise returns False.