Skip to content

Instantly share code, notes, and snippets.

@Manokrrish
Created February 7, 2012 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Manokrrish/1757759 to your computer and use it in GitHub Desktop.
Save Manokrrish/1757759 to your computer and use it in GitHub Desktop.
problem while passing filter to set Percolator
curl -XPUT http://localhost:9200/_percolator/alerts/alert1?refresh=true -d
'{
"query" : {
"term" : { "field1" : "value1" }
},
"filter" : {
"and" : [
{
"term" : { "field1" : "value2"}
}
]
}
}'
@kimchy
Copy link

kimchy commented Feb 7, 2012

curl -XPUT http://localhost:9200/_percolator/alerts/alert1?refresh=true -d '{
    "query" : {
        "filtered" : {
            "query" : {
                "term" : { "field1" : "value1" }
            },
            "filter" : {
                "term" : { "field1" : "value2"}
            }
        }
    }
}            

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment