插入语句
POST dynamic_table_data_prod/_doc/20220913182809274319000002
{
"id" : "20220913182809274319000002",
"data" : {
"姓名" : "横一",
"公海" : "",
"最后跟进时间" : "2022-09-20T10:58:46+0800",
"负责人" : "20200904234431484656",
"客户来源" : "xx公司",
"跟进阶段" : "458",
"黑名单" : "0",
"联系方式" : "5e648c1c596b0904f9841d0ba9e46868",
"意向标签" : "-1"
},
"createdBy" : null,
"modifiedBy" : null,
"platform" : "FUSION",
"tenantId" : "20200904234431484656",
"tableKey" : "20200904234431484656",
"createdAt" : "2022-09-14T18:28:10+0800",
"modifiedAt" : "2022-09-21T09:24:38+0800",
"deleted" : false
}
更新语句
POST dynamic_table_test/_doc/20211214113238000781000004/_update
{
"doc":{
"data":{
"code": "33010800101700122017701010001"
}
}
}
GET _tasks?detailed=true&actions=*reindex
-- 查看任务
GET _tasks/4Vx0PlfPTB6Qj8zJZvp8gA:32881133
增加mapping 中text的字段转keyword
PUT /your_index/_mapping
{
"properties": {
"your_text_field": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
查看索引列表
# 查看索引列表
curl -X GET "http://your_elasticsearch_server:9200/_cat/indices?v"
# 查看指定索引mapping
curl -X GET "http://your_elasticsearch_server:9200/search/_mappings"
# 查看指定索引设置信息
curl -XGET 'http://your_elasticsearch_server:9200/search/_settings?pretty'
A&Q
索引被锁住
curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/search/_settings -d '{"index.blocks.read_only_allow_delete": false}'
重新设置分词器
POST search/_open
PUT search/_settings
{
"index.analysis.analyzer.default":{
"type":"ik_smart"
}
}