慕粉1927057669
book/_mapping/novel?include_type_name=true PUT
{
"novel": {
"properties": {
"title": {
"type": "text"
}
}
}
}

qq_Onecallaway_1
LAlexH
使用put
HA习惯而已
es 7+版本 取消了type 所以图上的“man” type要删除
weixin_慕妹8276518
莫名其妙 重启master 问题解决?
冰魄剑魂
我是这么处理的
根据官方文档的示例, 先建立type

然后给type添加properties

secrethaha
现在映射中不能指定类型了
慕盖茨5445909
elasticsearch7默认不在支持指定索引类型,默认索引类型是_doc,如果想改变,则配置include_type_name: true 即可(这个没有测试,官方文档说的,无论是否可行,建议不要这么做,因为elasticsearch8后就不在提供该字段)。
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 1
},
"mappings" : {
"properties" : {
"name": {
"type": "text"
},
"country": {
"type": "keyword"
},
"age": {
"type": "integer"
},
"date": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
}
}
}
}
慕婉清9143579
一般语法要求都不能带中横线的,一般都是下划线。准照惯例罢了,没有不会出错,有了可能会出错。
qq_灬Mamba磊_0
qq_原点_25
慕用8226845
Indices created in 6.x only allow a single-type per index. Any name can be used for the type, but there can be only one.
kennethwoman
你那个不能重复提交 提交第二次就会报错
小小猪0904
settings
qq_uu_1
qq_onepiece_29
qq_哈之仆_0
.......
慕粉18534925221
这个插件有问题,发出去的请求接收不到,不是以json格式发送的.
看不惯你的爱情
增加备份数量,可以增加查询速度
kyrio
这是因为你安装了最新版的es,es从6.0以后就不支持一个索引指定多个类型了,默认一个类型且不能修改!所以你添加了两个类型就会报错
进阶的码农
这是一个集群中的主节点的初始列表,当节点(主节点或者数据节点)启动时使用这个列表进行探测
discovery.zen.ping.unicast.hosts: ["host1", "host2:port"]
Hataketed
一个master挂了会自动指定一个节点为master的
玫瑰湖的牧羊人
翻阅了大量的国外网站才找到答案,https://www.datadoghq.com/blog/elasticsearch-unassigned-shards/,

(磁盘空间超过了85%)时候将不再分配分片,我算了下我的容量使用率正好是85.04%,忍痛把一个游戏删了,然后重启集群,OK可以正常分配备份分片了
,不过我确实不得不承认在解决问题的时候,谷歌比百度靠谱太多了!
江仔
如你所说,确实会报错。
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Rejecting mapping update to [people] as the final mapping would have more than 1 type: [woman, man]"
}
],
"type": "illegal_argument_exception",
"reason": "Rejecting mapping update to [people] as the final mapping would have more than 1 type: [woman, man]"
},
"status": 400
}为什么呢?
总之,这是一个设计失误,后面的版本将不再支持。
官方给出解释是:https://www.elastic.co/guide/en/elasticsearch/reference/6.0/removal-of-types.html
倦意笑
看来这位同学也是插件爱好者\(^o^)/~,Chrome时间插件我用的Embark,你可以尝试一下,祝亲学习愉快~^_^
Selevlle
老师你好,我想问一下,我在网上看到的案例都是es配kibana,那么阿里云的sls日志服务可以配kibana么