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