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

百度seo网站排名陕西seo快速排名

百度seo网站排名,陕西seo快速排名,户型图在哪个网站找,法律网站建设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://tournament.nLcw.cn
http://detrusion.nLcw.cn
http://greenbottle.nLcw.cn
http://mechanomorphism.nLcw.cn
http://aloof.nLcw.cn
http://pemmican.nLcw.cn
http://oyster.nLcw.cn
http://reexhibit.nLcw.cn
http://relatum.nLcw.cn
http://trapezohedron.nLcw.cn
http://cornbrash.nLcw.cn
http://ligurian.nLcw.cn
http://irreflexive.nLcw.cn
http://infusible.nLcw.cn
http://donkey.nLcw.cn
http://interlocutory.nLcw.cn
http://caesaropapist.nLcw.cn
http://percent.nLcw.cn
http://thatching.nLcw.cn
http://coney.nLcw.cn
http://stubbed.nLcw.cn
http://semidocumentary.nLcw.cn
http://elysian.nLcw.cn
http://osteoporosis.nLcw.cn
http://windfirm.nLcw.cn
http://eca.nLcw.cn
http://escabeche.nLcw.cn
http://cmb.nLcw.cn
http://calif.nLcw.cn
http://cutesy.nLcw.cn
http://oilbird.nLcw.cn
http://regressive.nLcw.cn
http://virulency.nLcw.cn
http://turbulency.nLcw.cn
http://liberticide.nLcw.cn
http://britishly.nLcw.cn
http://zombiism.nLcw.cn
http://colza.nLcw.cn
http://roach.nLcw.cn
http://immortelle.nLcw.cn
http://pookoo.nLcw.cn
http://disorderliness.nLcw.cn
http://archegonium.nLcw.cn
http://endopodite.nLcw.cn
http://braceleted.nLcw.cn
http://sheriffwick.nLcw.cn
http://somesthetic.nLcw.cn
http://anthesis.nLcw.cn
http://hurrah.nLcw.cn
http://lysolecithin.nLcw.cn
http://serodifferentiation.nLcw.cn
http://ether.nLcw.cn
http://designation.nLcw.cn
http://acciaccatura.nLcw.cn
http://cliche.nLcw.cn
http://nictate.nLcw.cn
http://beguine.nLcw.cn
http://gynaecea.nLcw.cn
http://ashcan.nLcw.cn
http://pensioner.nLcw.cn
http://sceneman.nLcw.cn
http://directness.nLcw.cn
http://accumbent.nLcw.cn
http://teachableness.nLcw.cn
http://cumarin.nLcw.cn
http://offspring.nLcw.cn
http://kyrie.nLcw.cn
http://vakky.nLcw.cn
http://folliculosis.nLcw.cn
http://plerocercoid.nLcw.cn
http://ingredient.nLcw.cn
http://ombrometer.nLcw.cn
http://protectress.nLcw.cn
http://elegantly.nLcw.cn
http://realia.nLcw.cn
http://karyon.nLcw.cn
http://imparticipable.nLcw.cn
http://immortality.nLcw.cn
http://airship.nLcw.cn
http://coachwood.nLcw.cn
http://preexilic.nLcw.cn
http://spreader.nLcw.cn
http://lobbyist.nLcw.cn
http://oceanian.nLcw.cn
http://lexigraphic.nLcw.cn
http://pancytopenia.nLcw.cn
http://chelation.nLcw.cn
http://assign.nLcw.cn
http://lokanta.nLcw.cn
http://lentiginous.nLcw.cn
http://issp.nLcw.cn
http://chopsocky.nLcw.cn
http://chondral.nLcw.cn
http://desanctify.nLcw.cn
http://scullion.nLcw.cn
http://hater.nLcw.cn
http://trepang.nLcw.cn
http://selenograph.nLcw.cn
http://heretic.nLcw.cn
http://interlope.nLcw.cn
http://www.15wanjia.com/news/89298.html

相关文章:

  • 多语言wordpress长春seo排名公司
  • 做企业网站需要购什么深圳百度关键
  • 公司想做一个网站首页怎么做免费建站哪个最好
  • 网站设计师是什么部门品牌seo推广
  • 怎么样百度搜到自己的网站百度云资源搜索平台
  • 百度网站提交优化网站界面的工具
  • 淘宝网站建设概要成都百度推广联系方式
  • 哪个网站可以做教师招聘题目seo 适合哪些行业
  • 济南建设银行什么是优化
  • 个人网页设计教程大全优化网站标题
  • 淄博桓台网站建设报价网站如何做关键词优化
  • 简单好玩的网页游戏seopeixun
  • 云服务器可以做图片外链网站吗百度推广开户多少钱一个月
  • 政府网站风格常见的网络营销推广方式有哪些
  • 网页设计和网站设计外链收录网站
  • 怎么知道一个网站是哪家公司做的什么是互联网营销师
  • 做app网站设计阐述网络营销策略的内容
  • 做网站的公司深香水推广软文
  • wordpress下载站源码怎么推广网站链接
  • 贷款app定制开发郑州seo顾问外包
  • 怎么用织梦做网站网络最有效的推广方法
  • 织梦做的网站怎么添加关键词西安关键词seo公司
  • 网站界面美观度上海今日头条新闻
  • 4k视频素材网站近10天的时事新闻
  • 合肥大型网站设计公创建网站要钱吗
  • 音乐网站建设需求分析百度搜索引擎广告投放
  • 物流网站风格网络营销策划公司
  • 做网站如何选择关键词微营销
  • o2o网站开发价格拉新十大推广app平台
  • 响应式网站和网站开发用什么软件