def match(document,
          topic=None,
          result_key=None,
          result_relative_url='/_ah/prospective_search',
          result_task_queue='default',
          result_batch_size=DEFAULT_RESULT_BATCH_SIZE,
          result_return_document=True):
  # Convert document to datastore.Entity.
  topic = _get_document_topic(document.__class__, topic)
  pb = document._to_pb()
  entity = datastore.Entity('temp-kind').FromPb(pb)
  return prospective_search.match(
    entity,
    topic=topic,
    result_key=result_key,
    result_relative_url=result_relative_url,
    result_task_queue=result_task_queue,
    result_batch_size=result_batch_size,
    result_return_document=result_return_document)
Match document with all subscribed queries on specified topic.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/ndb/prospective_search.py/match