我正在使用游标从 GAE 全文搜索 API 获取结果。问题是光标在每次迭代中保持不变:
cursor = search.Cursor()
files_options = search.QueryOptions(
limit=5,
cursor=cursor,
returned_fields='state'
)
files_dict = {}
query = search.Query(query_string=text_to_search, options=files_options)
index = search.Index(name='title')
while cursor != None:
results = index.search(query)
cursor = results.cursor
即使搜索仅返回 18 个结果,光标也不会变为 None