Settings 和 Mappings_概述|学习笔记

简介: 快速学习 Settings 和 Mappings_概述。

开发者学堂课程【ElasticSearch 最新快速入门教程Settings 和 Mappings_概述】学习笔记,与课程紧密联系,让用户快速学习知识。

课程地址:https://developer.aliyun.com/learning/course/642/detail/10678


Settings 和 Mappings_概述

 

内容介绍:

一、 Settings 和 Mappings_概述

二、 Settings 和 Mappings_Settings 案例

 

一、Settings 和 Mappings_概述

简单的说,就是:

settings 是修改分片和副本数的。

mappings 是修改字段和类型的。

注意:可以用 url 方式来操作它们,也可以用 Java 方式来操作它们。建议用 url 方式,因为简单很多。

 

二、Settings 和 Mappings_Settings 案例

(1)维护索引库默认配置,经常用来修改默认配置。

例如:分片数量,副本数量

查看:

curl -XGET http://localhost:9200/bigdata/_settings?pretty

(2)操作不存在的索引:

curl -XPUT 'localhost:9200/bigdata/’

-d'{"settings":{"number_of_shards":3,"number_of_replicas": 2}}’

(3)操作已存在的索引:

curl -XPUT ‘localhost:9200/bigdata/_settings’

-d'{"index":{"number_of_replicas":2}}’

注意:

分片数在进库的时候已经指定好

相关文章
|
SQL Java 开发者
Settings 和 Mappings_概述 | 学习笔记
快速学习 Settings 和 Mappings_概述
63 0
|
JSON BI 数据格式
Settings 和 Mappings_Mappings_Ⅱ_案例|学习笔记
快速学习 Settings 和 Mappings_Mappings_Ⅱ_案例。
63 0
|
存储 自然语言处理 数据库
Settings 和 Mappings_Settings_Ⅱ_实例 | 学习笔记
快速学习 Settings 和 Mappings_Settings_Ⅱ_实例
69 0
Settings 和 Mappings_Settings_Ⅱ_实例 | 学习笔记
|
存储 自然语言处理 数据库
Settings 和 Mappings_Mappings_Ⅰ_介绍|学习笔记
快速学习 Settings 和 Mappings_Mappings_Ⅰ_介绍。
63 0
|
搜索推荐 开发者 索引
Settings 和 Mappings_Settings|学习笔记
快速学习 Settings 和 Mappings_Settings。
72 0
|
存储 自然语言处理 数据库
Settings 和 Mappings_Settings_Ⅰ_介绍 | 学习笔记
快速学习 Settings 和 Mappings_Settings_Ⅰ_介绍
75 0
Settings 和 Mappings_Settings_Ⅰ_介绍 | 学习笔记
|
开发者 索引
Settings 和 Mappings_Settings | 学习笔记
快速学习 Settings 和 Mappings_Settings
73 0
Settings 和 Mappings_Settings | 学习笔记
|
API 数据库 数据安全/隐私保护
FastAPI(64)- Settings and Environment Variables 配置项和环境变量(上)
FastAPI(64)- Settings and Environment Variables 配置项和环境变量(上)
455 0
FastAPI(64)- Settings and Environment Variables 配置项和环境变量(上)
|
存储 索引
|
Java 数据格式
Swagger报错:missed comma between flow collection entries
Swagger报错:missed comma between flow collection entries
312 0