1

由于from是一个特殊的 python 关键字,我无法传递它的pyes.es.search功能。它给出语法错误。pyes.es.search(maf, "twitter", "tweet", sort="timestamp", size=2, from=3). 我传递的关键字参数from也包含如下但from在其他工作时不起作用。

keywords = {'sort': 'timestamp', 'size':3, 'from':2}
r = pyes.es.search(maf, "twitter", "reply",**keywords)

此问题也适用于此处的另一个 python elasticsearch模块。在搜索功能界面有from参数。

4

1 回答 1

0

您是否尝试使用 start 参数?

这听起来像一个使用。

请参阅http://pyes.readthedocs.org/en/latest/references/pyes.queryset.html#pyes.queryset.QuerySet.start

于 2014-06-20T12:54:20.063 回答