ES mapping可以修改include_in_all,也可以修改index_options,norm,但是无法修改_all属性!

curl -XPOST "http://localhost:9200/productindex"

curl -XGET "http://localhost:9200/productindex/_mapping?pretty" 

curl -XPOST "http://localhost:9200/productindex/product/_mapping?pretty" -d '
{
"product": {
"properties": {
"title": {
"type": "string",
"include_in_all": true,
"index_options": "offsets",
"store": "yes"
},
"description": {
"type": "string",
"index": "not_analyzed"
},
"price": {
"type": "double"
},
"onSale": {
"type": "boolean"
},
"type": {
"type": "integer"
},
"createDate": {
"type": "date"
}
}
}
}
' curl -XGET "http://localhost:9200/productindex/_mapping?pretty" curl -XPOST "http://localhost:9200/productindex/product/_mapping?pretty" -d '{
"product": {
"properties": {
"amount":{
"type":"integer"
}
}
}
}' curl -XPOST "http://localhost:9200/productindex/product/_mapping?pretty" -d '{
"product": {
"properties": {
"title":{
"type":"string" ,
"norms" : {
"enabled" : false
},
"include_in_all": false,
"index_options": "docs",
"store": "yes"
}
}
}
}' 可以看到,是可以直接修改include_in_all和index_options、norms属性的! 注意是没有办法修改_all属性的!
curl -XPOST "http://localhost:9200/productindex/product/_mapping?pretty" -d '{
"product": {
"_source": {
"enabled": false
},
"_all": {
"enabled": false
}
}
}' 会提示:
MergeMappingException: Merge failed with failures {[mapper [_all] enabled is false now encountering true]}

ES mapping可以修改include_in_all,也可以修改index_options,norm,但是无法修改_all属性!的更多相关文章

  1. ES mapping的写入与查看

    Elasticsearch索引mapping的写入.查看与修改 https://blog.csdn.net/napoay/article/details/52012249 首先创建一个索引: curl ...

  2. 动态修改css文件中,具体的class中的个别属性值。

    function setStyleSheetObjCssClassProperty(pStyleSheetObj, pSelectorText, pProperty, pValue) { var pS ...

  3. chattr - 修改文件在Linux第二扩展文件系统(E2fs)上的特有属性

    SYNOPSIS(总览) chattr [ -RV ] [ -v version ] [ mode ] files... DESCRIPTION(描述) chattr 修改文件在Linux第二扩展文件 ...

  4. mybatis中修改了数据,控制台显示成功,数据库没有修改

    在mybatis中遇到了修改数据时,控制台显示修改成功,但是去数据库查看并没有修改,这是因为mybatis不时自动提交事务的,所以是不会修改数据库的数据,这是我们加上一句 sqlSession.com ...

  5. 26.使用IntelliJ IDEA开发Java Web项目时,修改了JSP后刷新浏览器无法及时显示修改后的页面

    转自:https://blog.csdn.net/yuxxz/article/details/51318908 使用IntelliJ IDEA开发Java Web项目时,修改了JSP后刷新浏览器无法及 ...

  6. 手动ubuntu 18.04修改登录锁屏界面效果(含登录背景修改)flat-remix

    前言 在ubuntu 18.04,可以通过修改/etc/alternatives/gdm3.css来进行修改 本来想直接使用flat-remix主题,但是只有这个登录界面没有达到作者演示的效果,所以手 ...

  7. ES mapping field修改过程

    Elasticsearch 的坑爹事--记录一次mapping field修改过程 http://www.cnblogs.com/Creator/p/3722408.html Elasticsearc ...

  8. ES 26 - 通过partial update局部更新索引文档 (partial update增量修改原理)

    目录 1 什么是partial update 1.1 全量修改文档的原理 1.2 修改指定field的思路 1.3 partial update的优势 1.4 partial update的使用 2 ...

  9. ES mapping映射及优化

    mapping映射 主要类型: 同一index下,不同type中如果有相同filed:es进行mapping映射的时候,按照先写进去的指定类型:比如同一index,包含的type中都有key1字段,如 ...

随机推荐

  1. Nuxt.js使用详解

    首先来讲一下服务端渲染 直白的说就是在服务端拿数据进行解析渲染,直接生成html片段返回给前端.具体用法也有很多种比如: 传统的服务端模板引擎渲染整个页面 服务渲染生成htmll代码块, 前端 AJA ...

  2. 2019西安多校联训 Day1

    试题链接:http://www.accoders.com/contest.php?cid=1893  考试密码请私信;    T1 明明就是O(n)的模拟,强行打成二分QAQ 思路:判断收尾是否为1或 ...

  3. TWaver矢量小试——Android演进路线图

    还有半个多月就到春节了,年底相信很多公司都会进行年度总结以及公司发展状况总结,在这过程中难免会用到RoadMap,在这我们也使用TWaver的矢量部分绘制一个Android系统的发展历程.先看效果:什 ...

  4. 大数低速幂运算模板(c++)+python大数幂

    简介 自己从大数加法改过来的模板,低速计算n的t次幂,n,t小于等于100速度能够保证 模板 #include <bits/stdc++.h> using namespace std; s ...

  5. Python使用Flask框架,结合Highchart处理jsonl数据

    1.html代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...

  6. APUE 文件和目录

    文件和目录 Unix 所有的文件都对应一个 struct stat,包含了一个文件所有的信息. #include <sys/stat.h> struct stat { mode_t st_ ...

  7. springcloud(十四):搭建Zuul微服务网关

    springcloud(十四):搭建Zuul微服务网关 1. 2. 3. 4.

  8. 线程 synchronized锁机制

    脏读 一个常见的概念.在多线程中,难免会出现在多个线程中对同一个对象的实例变量进行并发访问的情况,如果不做正确的同步处理,那么产生的后果就是"脏读",也就是取到的数据其实是被更改过 ...

  9. 【Codeforces 1019A】Elections

    [链接] 我是链接,点我呀:) [题意] 每个人都有自己喜欢的队员 但是如果贿赂他们可以让他们更改自己喜欢的队员 问你最少要花多少钱贿赂队员才能让1号队员严格有最多的人喜欢? [题解] 除了1号之外, ...

  10. ModelMap org.springframework.ui.ModelMap

    ModelMap实现了map接口,可以在其中存放属性,作用域同request,同时可与@SessionAttributes联合使用,把数据放入到session中去, 下面这个示例,我们可以在Model ...