How to filter result with python script file

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?

I write a python script just below ,

def boo(pid):
    if pid>200:
         return True
    return False 

it doesn't work, and below script can work


Where are you running this?

I put it below elasticsearch2.4/config/scripts/,and query like this

  "query": {
    "match_all": {}
  "post_filter": {
    "script": {
      "script": {
        "lang": "python",

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.