擅长:python、mysql、java
<p>首先,如果你窥视一下QueryOptions的构造函数,这就回答了为什么它会返回20个结果的问题:</p>
<pre><code>def __init__(self, limit=20, number_found_accuracy=None, cursor=None,
offset=None, sort_options=None, returned_fields=None,
ids_only=False, snippeted_fields=None,
returned_expressions=None):
</code></pre>
<p>我认为API之所以这样做是为了避免不必要的结果获取。如果需要在用户操作时获取更多结果,而不是总是获取所有结果,则应使用偏移量。见<a href="https://cloud.google.com/appengine/docs/python/search/queryoptionsclass" rel="nofollow">this</a>。在</p>
^{pr2}$