Created
May 8, 2012 05:51
-
-
Save brett--anderson/2632887 to your computer and use it in GitHub Desktop.
Elasticsearch setup to demonstrate filtering percolators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPUT http://localhost:9200/test/ | |
curl -XPUT localhost:9200/_percolator/test/perc_1 -d "{ \"color\" : \"blue\", \"query\" : { \"term\" : { \"sport\" : \"tennis\" } } }" | |
curl -XPUT localhost:9200/_percolator/test/perc_2 -d "{ \"color\" : \"blue\", \"query\" : { \"term\" : { \"sport\" : \"sailing\" } } }" | |
curl -XGET localhost:9200/test/type1/_percolate -d "{ \"doc\" : { \"sport\" : \"tennis\" }}" | |
curl -XGET localhost:9200/test/type1/_percolate -d "{ \"doc\" : { \"sport\" : \"tennis\" }, \"query\" : { \"term\" : { \"color\" : \"blue\" } }}" | |
curl -XDELETE http://localhost:9200/test/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment