GET _cluster/health?prettyGET _cluster/stats?human&prettyGET _nodes?pretty → curl -XGET <IP>/_nodesGET _nodes/nodeId1curl -XPUT "localhost:9200/twitter/tweet/1?pretty" -H
"Content-Type: application/json" -d"
{
"user":"openwebinars",
"post_date": "2009-11-15T14:12:12"
"message": "pruebaq en Elasticsearch"
}"
curl -XGET 'localhost:9200/twitter/tweet/1?pretty'
curl -XDELETE 'http://localhost:9200/twitter/tweet/6?pretty
curl -XPOST 'localhost:9200/twitter/tweet/5/_update?pretty' -H
'Content-Type: application/json' -d'
{
"script": "ctx._source.new_field='valor nuevo campo' "
}'
curl -XGET 'localhost:9200/twitter/tweet/_search?q=user:openwebinars&pretty'
curl -XGET 'localhost:9200/twitter/tweet/_search?q=new_field:valor nuevo campo&pretty'
curl -XGET 'localhost:9200/twitter/tweet/_search?pretty'
-H 'Content-Type: application/json' -d'
{
"query": {
"term":{"user":"user1"}
}
}'
curl -XGET 'localhost:9200/_search/template?pretty' -H 'Content-Type:
application/json' -d’ {
"inline" : {
"query": { "match" : { "{{my_field}}" : "{{my_value}}" } },
"size" : "{{my_size}}"
},
"params" : {
"my_field" : "user",
"my_value" : "openwebinars",
"my_size" : 1
} } '
curl -XGET 'localhost:9200/twitter/_serach_shards?pretty'
curl -XPUT 'localhost:9200/new_index?pretty' -H 'ContentType: application/json' -d'
{
"settings" : {
"index" : {
"number_of_shards" : 3,
"number_of_replicas" : 2
} } }'
curl -XDELETE 'localhost:9200/new_index?pretty'
curl -XPOST 'localhost:9200/new_index/_close?pretty' curl -XPOST 'localhost:9200/new_index/_open?pretty'
curl -XGET ‘localhost:9200/twitter/_mapping/tweet?pretty'
curl -XGET 'localhost:9200/_stats?pretty'
curl -XGET 'localhost:9200/twitter/_search?pretty' -
H 'Content-Type: application/json' -d'
{
"query": {
"match_all": {}
}
}'
curl -XGET 'localhost:9200/twitter/_search?pretty' -
H 'Content-Type: application/json' -d'
{
"query": {
"match" : {
"user" : "user2"
} } } '
curl -XGET 'localhost:9200/twitter/_search?pretty' -H
'Content-Type: application/json' -d'
{
"query": {
"regexp":{
"user": "user.*"
} } } '