欢迎光临
我们一直在努力

【大模型应用开发-ES】(五)ElasticSearch索引创建与管理

一、学习目标

  • 掌握ES索引的创建与删除
  • 理解Mapping(映射)的作用与配置方式
  • 学会查看索引信息与设置
  • 了解索引别名的使用方法

二、操作步骤

步骤1:创建索引(带Mapping)

创建一个名为 books 的索引,并定义字段类型映射:

curl -X PUT \”localhost:9200/books\” -H \’Content-Type: application/json\’ -d\’
{
\”settings\”: {
\”number_of_shards\”: 1,
\”number_of_replicas\”: 0
},
\”mappings\”: {
\”properties\”: {
\”title\”: { \”type\”: \”text\”, \”analyzer\”: \”standard\” },
\”auth

赞(0)
未经允许不得转载:171主机测评 » 【大模型应用开发-ES】(五)ElasticSearch索引创建与管理
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址