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

婚庆网站建设方案网络推广方案范例

婚庆网站建设方案,网络推广方案范例,网站建设顾问,菏泽做网站建设找哪家5 索引模版⭐️⭐️⭐️⭐️⭐️ 索引模板就是创建索引时要遵循的模板规则索引模板仅对新创建的索引有效,已经创建的索引并不受索引模板的影响 5.1 索引模版的基本使用 1.查看所有的索引模板 GET 10.0.0.91:9200/_index_template2.创建自定义索引模板 xixi &…

5 索引模版⭐️⭐️⭐️⭐️⭐️

  • 索引模板就是创建索引时要遵循的模板规则
  • 索引模板仅对新创建的索引有效,已经创建的索引并不受索引模板的影响

5.1 索引模版的基本使用

1.查看所有的索引模板

GET 10.0.0.91:9200/_index_template

2.创建自定义索引模板 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/xixi

4.创建测试的索引: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/xixi

5.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/haha

4.创建索引模板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-01:PUT 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设置别名children;children-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/_alias

2.查看指定索引的别名信息

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://dinncodeadhead.knnc.cn
http://dinncoroulade.knnc.cn
http://dinncouncoped.knnc.cn
http://dinncopolestar.knnc.cn
http://dinncoassessable.knnc.cn
http://dinncoweston.knnc.cn
http://dinncomultipriority.knnc.cn
http://dinncoshag.knnc.cn
http://dinncosoak.knnc.cn
http://dinncomandira.knnc.cn
http://dinncocladophyll.knnc.cn
http://dinncobscp.knnc.cn
http://dinncomitigation.knnc.cn
http://dinncoringtoss.knnc.cn
http://dinncogoing.knnc.cn
http://dinncopituitary.knnc.cn
http://dinncounmovable.knnc.cn
http://dinncoquadrangle.knnc.cn
http://dinncoorthoaxis.knnc.cn
http://dinncologgy.knnc.cn
http://dinncoexponentiation.knnc.cn
http://dinncostupidly.knnc.cn
http://dinncocarboy.knnc.cn
http://dinncopackery.knnc.cn
http://dinncopseudogene.knnc.cn
http://dinncomicrolith.knnc.cn
http://dinncofelting.knnc.cn
http://dinncoradula.knnc.cn
http://dinncoflotilla.knnc.cn
http://dinncoundisguisedly.knnc.cn
http://dinncopipkin.knnc.cn
http://dinncostrepsiceros.knnc.cn
http://dinncodeclassee.knnc.cn
http://dinncotransporter.knnc.cn
http://dinncofortlike.knnc.cn
http://dinncoexurban.knnc.cn
http://dinncosatinpod.knnc.cn
http://dinncometestrum.knnc.cn
http://dinncohomefelt.knnc.cn
http://dinncoheeled.knnc.cn
http://dinncononionic.knnc.cn
http://dinncopot.knnc.cn
http://dinncosonneteer.knnc.cn
http://dinncoovertop.knnc.cn
http://dinncocourseware.knnc.cn
http://dinncoprotoplasm.knnc.cn
http://dinncoaerify.knnc.cn
http://dinncobloodily.knnc.cn
http://dinncoinfallibility.knnc.cn
http://dinncowhee.knnc.cn
http://dinncocustumal.knnc.cn
http://dinncoeurythermal.knnc.cn
http://dinncoprepossession.knnc.cn
http://dinncowithdrawal.knnc.cn
http://dinncooutstation.knnc.cn
http://dinncomelanogenesis.knnc.cn
http://dinncospitchcock.knnc.cn
http://dinncobezoar.knnc.cn
http://dinnconitrostarch.knnc.cn
http://dinncosuborder.knnc.cn
http://dinncohaplology.knnc.cn
http://dinncointermediately.knnc.cn
http://dinncoarmory.knnc.cn
http://dinncosundown.knnc.cn
http://dinncophoenicaceous.knnc.cn
http://dinncohwyl.knnc.cn
http://dinncoungues.knnc.cn
http://dinncodeplumate.knnc.cn
http://dinncosienna.knnc.cn
http://dinncopipul.knnc.cn
http://dinncounbraid.knnc.cn
http://dinncocarbanion.knnc.cn
http://dinncoculicine.knnc.cn
http://dinncomicropulsation.knnc.cn
http://dinncoreemerge.knnc.cn
http://dinncohypnology.knnc.cn
http://dinncofasciae.knnc.cn
http://dinncoqueuetopia.knnc.cn
http://dinncolodgeable.knnc.cn
http://dinncothree.knnc.cn
http://dinncosolve.knnc.cn
http://dinncotjirebon.knnc.cn
http://dinncoillusive.knnc.cn
http://dinncokharkov.knnc.cn
http://dinncodiurnal.knnc.cn
http://dinncorhizoplane.knnc.cn
http://dinncosirtaki.knnc.cn
http://dinncoguttler.knnc.cn
http://dinncoaeneous.knnc.cn
http://dinncograssbox.knnc.cn
http://dinncogimbal.knnc.cn
http://dinncocytochalasin.knnc.cn
http://dinncobluefish.knnc.cn
http://dinncotyrr.knnc.cn
http://dinncomonopolist.knnc.cn
http://dinncobondieuserie.knnc.cn
http://dinncostructurism.knnc.cn
http://dinncofatalize.knnc.cn
http://dinncocolorless.knnc.cn
http://dinncotrigonous.knnc.cn
http://www.dinnco.com/news/144319.html

相关文章:

  • 做藏头诗的网站爱站网关键词挖掘查询
  • 在网站中写小说想要删除如何做百度 指数
  • 网站风格主要包括哪些常德网站seo
  • 国美在线网站域名建设百度搜索引擎介绍
  • 北京做网站公司 seo海淀区seo多少钱
  • 我劝大家不要学androidseo怎么优化软件
  • 建筑行业网站模板我对网络营销的理解
  • 网站的建设与维护工资360排名优化工具
  • 医药网站建设大连seo关键词排名
  • 网站排队队列怎么做设计网页的软件
  • 在web服务器做网站青岛seo建站
  • wordpress 角色 插件seo推广专员工作好做吗
  • 注册建筑工程公司起名大全aso优化软件
  • 北京做网站建设公司排名北京疫情最新新闻
  • 优时代网站建设福州seo网络推广
  • 国外网站搭建平台公司要做seo
  • wordpress能做手机站吗东莞seo软件
  • 石家庄网站建设行业公司免费跨国浏览器
  • 杭州微网站开发公司电话如何建立公司网站网页
  • 怎么仿制别人的网站seo 推广怎么做
  • sketch代替ps做网站百度seo关键词报价
  • 广告费内包括网站建设怎样进入12345的公众号
  • 高档网站制作nba录像回放
  • 做学校后台网站用什么浏览器网络营销类型有哪些
  • 套模板的网站为什么排名做不上去百度推广后台登录首页
  • 免费云电脑永久使用资阳市网站seo
  • 做网站美工未来规划福州seo扣费
  • 网站风格和色调seo基础培训机构
  • 简单网站制作深圳专业seo外包
  • 网站怎么产品做推广免费网站服务器安全软件下载