Last active
August 29, 2015 14:13
-
-
Save ian-bartholomew/c80654f30ee98bf08505 to your computer and use it in GitHub Desktop.
Elasticsearch percolate test
This file contains hidden or 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
- create - | |
curl -XPUT 'localhost:9200/my-index/my-type/1' -d '{"title" : "Coffee percolator", "body" : "A coffee percolator is a type of ..."}' | |
- search - | |
curl -XGET 'localhost:9200/my-index/_search' -d '{"query" : {"match" : {"body" : "coffee"}}}' | |
- get all - | |
curl -XGET 'localhost:9200/my-index/_search?pretty=true' | |
- Register a query - | |
curl -XPUT 'localhost:9200/my-index/.percolator/1' -d '{"query" : {"match" : {"body" : "coffee"}}}' | |
- Percolate a document - | |
curl -XGET 'localhost:9200/my-index/my-type/_percolate?pretty=true' -d '{"doc" : {"title" : "Coffee percolator","body" : "A coffee percolator is a type of …"}}' | |
- get that doc - | |
curl -XGET 'localhost:9200/my-index/my-type/1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment