54 lines
602 B
JavaScript
54 lines
602 B
JavaScript
// Test _ 1
|
|
|
|
PUT /users
|
|
{
|
|
"mappings": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "text"
|
|
},
|
|
"age": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// Create Index
|
|
|
|
POST /users/_doc
|
|
{
|
|
"name": "Ali",
|
|
"age": 30
|
|
}
|
|
|
|
POST /users/_doc
|
|
{
|
|
"name": "mohammad",
|
|
"age": 20
|
|
}
|
|
|
|
POST /users/_doc/0
|
|
{
|
|
"name": "hamed",
|
|
"age": 50
|
|
}
|
|
// Insert Into Index
|
|
|
|
|
|
GET /users/_doc/_count
|
|
|
|
// count of index
|
|
|
|
Delete /users/_doc/0313123
|
|
|
|
// Delete of Index
|
|
|
|
|
|
GET /users/_doc/_count
|
|
|
|
// count of index
|
|
|
|
|
|
Delete /users
|
|
|
|
// Delete Index
|