Skip to content

@forste /gist:2819256
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
default put, get, delete
curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{
"user" : "kimchy",
"post_date" : "2009-11-15T14:12:12",
"message" : "trying out Elastic Search"
}'
//shows data from above
curl -XGET 'http://localhost:9200/twitter/tweet/_search' -d '{
query : {
bool : {
should : [
{
matchAll : {}
}
],
must: [
{
text: {
user : {
query: "kimchy",
operator: "and"
}
}
}
]
}
}
}'
curl -XDELETE 'http://localhost:9200/twitter/tweet/_query' -d '{
"term" : { "user" : "kimchy" }
}'
//tweet is deleted
curl -XGET 'http://localhost:9200/twitter/tweet/_search' -d '{
query : {
bool : {
should : [
{
matchAll : {}
}
],
must: [
{
text: {
user : {
query: "kimchy",
operator: "and"
}
}
}
]
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.