由于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
参数。