Source : https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html
PUT /<index>/_doc/1
{
"champ1": "value1",
"champ2": "value2"
}
ou
POST /<index>/_doc
{
"champ1": "value1",
"champ2": "value2"
}
GET /<index>/_doc/<num>/
GET /<index>/_search
POST /<index>/_update/<num>/
{
"doc": {
"field": "value"
}
}
DELETE /<index>/_doc/<_id>
GET /_cat/indices
GET /_cat/indices?v
PUT /<index>
{
"settings": {
"number_of_shards": 1, // default 5
"number_of_replicas": 0 // default 1
}
}
PUT /<index>
{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 0
}
},
"mappings": {
"properties": {
"<property>": {
"type": "<datatype>"
}
}
}
}
}
DELETE /<index>
GET /<index>/_mapping
PUT /<index>/_mapping
{
"properties": {
"<new_fieldname>": {
"type": "<datatype>"
}
}
}
POST /<index>/_update_by_query
{
"script": {
"inline": "ctx._source.<fieldname> = ctx._source.<fieldname>"
}
}