Created
October 17, 2015 14:09
-
-
Save 2trc/4c15213c64bd42af5aa3 to your computer and use it in GitHub Desktop.
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 -XDELETE 'localhost:9200/my-index' | |
curl -XPUT 'localhost:9200/my-index' -d '{ | |
"mappings": { | |
"my-type": { | |
"properties": { | |
"message": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}' | |
curl -XPUT 'localhost:9200/my-index/.percolator/1' -d '{ | |
"query" : { | |
"match" : { | |
"message" : "bonsai tree" | |
} | |
} | |
}' | |
curl -XGET 'localhost:9200/my-index/my-type/_percolate' -d '{ | |
"doc" : { | |
"message" : "A new bonsai tree in the office" | |
} | |
}' | |
curl -XPUT 'localhost:9200/my-index/.percolator/2' -d '{ | |
"query" : { | |
"match" : { | |
"message" : "\"bonsai in the office\"" | |
} | |
} | |
}' | |
curl -XGET 'localhost:9200/my-index/my-type/_percolate' -d '{ | |
"doc" : { | |
"message" : "A new bonsai tree in the office" | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment