我的代码是:
import pyes
conn = pyes.ES(myes_path)
siplist =['a','b','c']
diplist = ['d','e','f']
bf = pyes.filters.BoolFilter()
bf.add_must(pyes.filters.TermsFilter('sip',siplist))
bf.add_must(pyes.filters.TermsFilter('dip',diplist))
fq = pyes.query.FilteredQuery(pyes.query.MatchAllQuery(),bf)
res = conn.search(fq,'hhhhh')
print res.total
我总是收到这个错误:
bits = error.split('[',1)TypeError:'NoneType'对象不可调用
有谁知道这是什么问题?