POST /_aliases { "actions": [ { "add": { "index": "xiaoyu_movie", "alias": "alias_yu" } } ] } //使用别名查询 GET /alias_yu/_search 评分 查找地址中含有河北的数据, 按照age从大到小排序,如果有多段查询可以使用 factor 参数增强某查询语句的影响力 代码语言:javascript 代码运行次数:0 ...
创建或更新一个老版索引模板,需要向 /_template 发送 PUT 请求,配置包括 aliases、settings、mappings、order 等字段。 PUT_template/web_monitor{order:0,index_patterns:["web_monitor_*"],settings:{index:{number_of_shards:1}},mappings:{dynamic:"strict",properties:{app_version:{type:"keyword"},ctime:...
PUT /logs_20162801 { "mappings" : { "type" : { "properties" : { "year" : {"type" : "integer"} } } }, <!-- 定义了两个别名 --> "aliases" : { "current_day" : {}, "2016" : { "filter" : { "term" : {"year" : 2016 } } } } } 3. 创建别名 /_aliases 为索引test...
{ "shopping": { "aliases": {}, "mappings": {}, "settings": { "index": { "routing": { "allocation": { "include": { "_tier_preference": "data_content" } } }, "number_of_shards": "1", "provided_name": "shopping", "creation_date": "1633513773067", "number_of_replicas": ...
"aliases": { "default_index": {} } } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 索引别名 插入数据 AI检测代码解析 POST /my_index/_doc/1 { "field1":"java", "field2":"js" ...
curl -XGET 'localhost:9200/_cat/indices/demo_v1,demo_v2?v' 6、给索引设置别名 #给索引demo_v1设置别名demo curl -XPUT 'localhost:9200/demo_v1/_alias/demo' #给索引demo_v1设置别名demo curl -XPOST 'localhost:9200/_aliases?pretty' -d'{ ...
查(GET) postman 发送 GET 请求:http://127.0.0.1:9200/shopping 会返回 shopping 这个索引的相关信息: { "shopping": { "aliases": {}, "mappings": {}, "settings": { "index": { "routing": { "allocation": { "include": { "_tier_preference": "data_content" } } }, "number_of_shards...
GET /gmall 结果: {"gmall":{"aliases":{},"mappings":{"SkuLsInfo":{"properties":{"catalog3Id":{"type":"keyword"},"hotScore":{"type":"double"},"id":{"type":"keyword","index":false},"price":{"type":"double"},"skuAttrValueList":{"properties":{"attrId":{"type":"text","...
es.indices.aliases(options, callback) Analyze es.indices.analyze(options, data, callback) Clear Cache es.indices.clearCache(options, callback) Close Index Requires_indexbe specified either via lib config or via options when calling the operation. ...
{\"preference\":\"_shards:0\"}"#Backup aliases to a fileelasticdump \ --input=http://es.com:9200/index-name/alias-filter \ --output=alias.json \ --type=alias#Import aliases into ESelasticdump \ --input=./alias.json \ --output=http://es.com:9200 \ --type=alias#Backup ...