code: def can_elasticsearch(record):
      
      search = request._methodview.search_class()
      search = search.get_record(str(record.id))
      return search.count() == 1
docs: Check if a given record is indexed.
  
      :param record: A record object.
      :returns: If the record is indexed returns `True`, otherwise `False`.