当前位置: 首页 > news >正文

中国建设银行网站会员注册网站空间域名购买

中国建设银行网站会员注册,网站空间域名购买,温州专业网站托管,做贷款网站5 索引模版⭐️⭐️⭐️⭐️⭐️ 索引模板就是创建索引时要遵循的模板规则索引模板仅对新创建的索引有效#xff0c;已经创建的索引并不受索引模板的影响 5.1 索引模版的基本使用 1.查看所有的索引模板 GET 10.0.0.91:9200/_index_template2.创建自定义索引模板 xixi 已经创建的索引并不受索引模板的影响 5.1 索引模版的基本使用 1.查看所有的索引模板 GET 10.0.0.91:9200/_index_template2.创建自定义索引模板 xixi 设置为 5分片3副本。 也就是说以后创建的索引只要是以xixi开头都会遵循5分片0副本的设置。 POST 10.0.0.91:9200/_index_template/xixi {index_patterns: [xixi*],template: {settings: {number_of_shards: 5,number_of_replicas: 3}} }3.查看单个索引模板 xixi GET 10.0.0.91:9200/_index_template/xixi4.创建测试的索引PUT 10.0.0.91:9200/xixi-001查看该条索引确实遵循了索引模版xixi 设置的 5分片0副本 ...number_of_shards: 5,provided_name: xixi-01,creation_date: 1731679377301,number_of_replicas: 3,uuid: 15RcpNdsQAOqbg97_1AIBQ,version: {created: 7172299 ...5.修改索引模板 xixi修改为 3分片2副本。方法其实和创建索引模版完全一样 PUT 10.0.0.91:9200/_index_template/xixi {index_patterns: [xixi*],template: {settings: {number_of_shards: 3,number_of_replicas: 2}} }8.删除索引模板 xixi DELETE 10.0.0.91:9200/_index_template/xixi5.2 索引模版和组件模版的使用 提示如果索引模版和组件模版同时定义分片数那么最终索引模版会生效。这里不在演示 1.查看现有的组件模板 GET 10.0.0.93:9200/_component_template/2.创建自定义的组件模板 haha设置为10分片 POST 10.0.0.93:9200/_component_template/haha {template: {settings: {number_of_shards: 10}} }3.查看单个组件模板 haha GET 10.0.0.93:9200/_component_template/haha4.创建索引模板hehe设置为3副本并引用haha组件模版10分片。这样以后匹配到hehe索引模版的的索引都是10分片3副本 GET 10.0.0.91:9200/_index_template/hehe {index_patterns: [hehe*],composed_of: [haha],template: {settings: {number_of_replicas: 3}} }5.创建一条索引hehe-01PUT 10.0.0.92:9200/hehe-01查看符合预期10分片3副本 ...number_of_shards: 10,provided_name: hehe-01,creation_date: 1731681895210,number_of_replicas: 3,uuid: p1lOEKawSB6Id70hqbetlw,version: {created: 7172299} ...6 索引别名 可以将多个不同的索引打上相同的别名将来基于别名进行查询就可以将这些不同索引的数据一起查询。 假设有一条索引叫apple另一条索引叫banana。两者名字上并没有关联可以给它们打上fruit的别名这样就能查询这两条索引的 数据了 总结就是因为索引名称不统一而导致不能批量查询就可以使用别名 6.1 索引别名使用案例 1.环境准备。创建索引并写入数据 POST 10.0.0.93:9200/_bulk { index : { _index : children-001} } {name: 韩V童,hobby: [睡觉,美女,上课]} { index : { _index : children-002} } {name: 王K鹏,hobby: [钓鱼,摸泥鳅,打扑克]} { index : { _index : children-003} } {name: 黄钰风,hobby: [cosplay二次元,喝枸杞,吃羊腰]} { index : { _index : children-004} } {name: 刘四,hobby: [打游戏,吃烤串,欧美大片]} { index : { _index : children-005} } {name: 赵x亮,hobby: [韩V童,吃汉堡,小电影]} { index : { _index : children-006} } {name: 陈LL,hobby: [抽烟,喝酒,烫头]} { index : { _index : children-007} } {name: 张T,hobby: [抽烟,溜鸟,夜跑]} 2.给索引设置别名。children-0016设置别名childrenchildren-0012设置别名successfully POST 10.0.0.93:9200/_aliases {actions: [{add: {index: children-001,alias: children}},{add: {index: children-002,alias: children}},{add: {index: children-003,alias: children}},{add: {index: children-004,alias: children}},{add: {index: children-005,alias: children}},{add: {index: children-006,alias: children}},{add: {index: children-001,alias: successfully}},{add: {index: children-002,alias: successfully}}] }3.在es head上查看别名 4.创建索引模式可以发现别名 5.不使用通配符直接使用别名children进行索引 6.使用别名查询数据可以发现children把所有children-00{1…6}都匹配到了 6.2 索引别名的管理 1.查看所有索引的别名信息 GET 10.0.0.93:9200/_alias2.查看指定索引的别名信息 GET 10.0.0.93:9200/children-003/_alias输出 {children-003: {aliases: {children: {}}} }3.修改别名。把索引children-006的别名修改为boy。 提示别名不能直接修改而是移除旧别名打上新别名 POST 10.0.0.93:9200/_aliases{actions: [{remove: {index: children-006,alias: boy}},{add: {index: children-006,alias: boy}}] }查看新别名boy 4.别名的删除 POST 10.0.0.91:9200/_aliases {actions: [{remove: {index: children-006,alias: boy}}] } ias: boy}}] }查看新别名boy[外链图片转存中…(img-j6dYh6R4-1732552623144)] 4.别名的删除 POST 10.0.0.91:9200/_aliases {actions: [{remove: {index: children-006,alias: boy}}] }
http://www.dnsts.com.cn/news/271860.html

相关文章:

  • 建设工程信息网站宜宾网站建设公司
  • 网站设置手机才能播放宁波市建筑业管理信息网
  • 网站主页面布局怎么做内部网站建设软件
  • illustrator 学习网站wordpress prevent copy paste
  • 网站开发 男生网站建设客户开发方案
  • 门户型网站建设方案wordpress白屏问题
  • 淄博网站建设公司有几家山东济南seo整站优化
  • 给个网站好人有好报2021手机网站报名链接怎么做
  • 网站建设平台案例南宁住建局官方网
  • photoshop画简单网站开发者管理
  • 网站建设意思vps wordpress cpu占用过高
  • 建立网站需要哪些手续中国菲律宾世预赛直播
  • 河南网站域名备案有意思网站推荐
  • 网站模板哪个网站好免费h5在线制作平台
  • 国外 网站有做验证码吗兰州装修公司报价明细表
  • 做公司永久免费网站什么好如何看自己网站流量
  • 帝国cms 网站搬家成都兼职建设网站
  • 汕头网站建设搭建商丘网站制作的流程
  • 中国空间站最新消息新闻室内装饰设计说明
  • 网站子页设计广东水利建设与管理信息网站
  • 鄂州第一官方网站八年级信息做网站所用软件
  • 凡科可以建设多个网站吗中国建设教育协会网站培训中心
  • 网站遮罩是什么游戏软件开发公司排名
  • 如何实现企业网站推广的系统性个人社保缴费基数是什么意思
  • 加强普法网站建设的通知物联网卡一年服务费多少钱啊
  • 短视频分享网站开发做电影网站用什么程序
  • 公众号版影视网站开发国外画册设计网站
  • 广州找人做网站whois域名查询官网
  • 做门户网站服务器选择石狮住房和城乡建设网站
  • 品牌网站的目的做电商网站的设计思路有什么意思