I want filter search result with my local python script,I have try es2.4 's python script file ,It won't work even call a simple function.What should I do?
Providing more info would be helpful.
What does that mean?
What does the function look like?
@warkolm
I write a python script just below ,
def boo(pid):
if pid>200:
return True
return False
boo(doc['pid'].value)==True
it doesn't work, and below script can work
doc['pid'].value>200
Where are you running this?
@warkolm
I put it below elasticsearch2.4/config/scripts/test.py
,and query like this
{
"query": {
"match_all": {}
},
"post_filter": {
"script": {
"script": {
"lang": "python",
"file":"test"
}
}
}
}
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.