查询所有索引
GET _cat/indices
查看索引结构
GET /test-index
根据id 查询
GET /test-index/_search
{
"query":{
"match":{
"id":300010688
}
}
}
添加字段
PUT /test-index/_mapping/test-index
{
"properties": {
"dasdsa": {
"type": "integer"
}
}
}
修改一个属性
POST /test-index/test-index/300010688/_update
{
"doc":{
"transCount":999
}
}
创建索引
PUT /test-index
{"settings": {
"index": {
"number_of_shards": "1",
"number_of_replicas": "0"
}
},
"mappings":{
"album-index":{
"properties":{
"albumPic":{
"type":"keyword"
},
"blockIds":{
"type":"long"
},
"circulationCount":{
"type":"long"
},
"createTime":{
"type":"date",
"format":"yyyy-MM-dd HH:mm:ss||epoch_millis"
},
"name":{
"type":"text",
"analyzer":"ik_max_word"
}
}
}
}
}
删除索引
DELETE /test-index
复制索引数据
POST _reindex
{
"source": {
"index": "test-indextmp"
},
"dest": {
"index": "test-index"
}
}
网友评论