因为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模块,这里是here。在搜索函数接口中有from参数。
发布于 2014-06-20 20:54:20
你有没有尝试过启动参数?
听起来像是要用的那个。
请参阅http://pyes.readthedocs.org/en/latest/references/pyes.queryset.html#pyes.queryset.QuerySet.start
https://stackoverflow.com/questions/24017650
复制相似问题