ES field store yes no 区别——可以设置为false,如果_source有的话
store
By default, field values are indexed to make them searchable, but they are not stored. This means that the field can be queried, but the original field value cannot be retrieved.
Usually this doesn’t matter. The field value is already part of the _source field, which is stored by default. If you only want to retrieve the value of a single field or of a few fields, instead of the whole_source, then this can be achieved with source filtering.
In certain situations it can make sense to store a field. For instance, if you have a document with atitle, a date, and a very large content field, you may want to retrieve just the title and the datewithout having to extract those fields from a large _source field:
PUT my_index
{
"mappings": {
"my_type": {
"properties": {
"title": {
"type": "text",
"store": true
},
"date": {
"type": "date",
"store": true
},
"content": {
"type": "text"
}
}
}
}
} PUT my_index/my_type/1
{
"title": "Some short title",
"date": "2015-01-01",
"content": "A very long content field..."
} GET my_index/_search
{
"stored_fields": [ "title", "date" ]
}
|
|
The |
|
|
This request will retrieve the values of the |
来自:https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html
ES field store yes no 区别——可以设置为false,如果_source有的话的更多相关文章
- ES索引瘦身 禁用_source后需要设置field store才能获取数据 否则无法显示搜索结果
在默认情况下,开启_all和_source 这样索引下来,占用空间很大. 根据我们单位的情况,我觉得可以将需要的字段保存在_all中,然后使用IK分词以备查询,其余的字段,则不存储. 并且禁用_sou ...
- lucene中Field.Index,Field.Store的一些设置
lucene在doc.add(new Field("content",curArt.getContent(),Field.Store.NO,Field.Index.TOKENIZE ...
- lucene中Field.Index,Field.Store详解
lucene在doc.add(new Field("content",curArt.getContent(),Field.Store.NO,Field.Index.TOKENIZE ...
- 【转载】lucene中Field.Index,Field.Store详解
lucene在doc.add(new Field("content",curArt.getContent(),Field.Store.NO,Field.Index.TOKENIZE ...
- Lucene.NET中Field.Index 和 Field.Store的几种属性的用法
转载自 http://blog.csdn.net/yja886/article/details/6612069 lucene在doc.add(new Field("content" ...
- Lucene——Field.Store(存储域选项)及Field.Index(索引选项)
Field.Store.YES或者NO(存储域选项) 设置为YES表示或把这个域中的内容完全存储到文件中,方便进行文本的还原 设置为NO表示把这个域的内容不存储到文件中,但是可以被索引,此时内容无法完 ...
- cxf client在后台不通且chunk设置为false的时候不能在控制台输出请求日志
场景: 服务编排框架支持编排webservice服务.call webservice的client是基于cxf做的.为了使用服务编排的开发者调试与定位问题方便,需要将webservice的请求与响应报 ...
- (转)通过在 Page 指令或 配置节中设置 validateRequest=false 可以禁用请求验证
通过在 Page 指令或 配置节中设置 validateRequest=false 可以禁用请求验证 说明: 请求验证过程检测到有潜在危险的客户端输入值,对请求的处理已经中止.该值可能指示危及应用 ...
- Webpack4 的 Tree Shaking:babel-loader设置modules: false,还是设置"sideEffects": false,待确定
Webpack4 的 Tree Shaking:babel-loader设置modules: false,还是设置"sideEffects": false,待确定 babel-lo ...
随机推荐
- Huffman编码(Huffman树)
[0]README 0.1) 本文总结于 数据结构与算法分析, 源代码均为原创, 旨在 理解 "Huffman编码(Huffman树)" 的idea 并用源代码加以实现: 0.2) ...
- NYOJ-欧几里得
欧几里得 时间限制:1000 ms | 内存限制:65535 KB 难度:0 描写叙述 已知gcd(a,b)表示a,b的最大公约数. 如今给你一个整数n,你的任务是在区间[1,n)里面找到一个最大 ...
- Windows server2008 搭建ASP接口訪问连接oracle数据库全过程记录
真的是太不easy了,曾经的时候在window server 2003上面搭建了一套asp+oracle的接口系统.就费了好大的劲儿,事实上那会迷迷瞪瞪的也不知道怎么的就弄好了,也懒得管了.OK,从昨 ...
- mysql-proxy做客户端连接转发【外网访问内网mysql】
功能 用于外网客户端连接内网的MySQL,将此工具安装在中转服务器上. 软件版本 mysql-proxy-0.8.1-linux-rhel5-x86-64bit.tar.gz 简单的配置过程 解压后有 ...
- Linux时间时区详解与常用时间函数
时间与时区 整个地球分为二十四时区,每个时区都有自己的本地时间. Ø UTC时间 与 GMT时间 我们可以认为格林威治时间就是时间协调时间(GMT = UTC),格林威治时间和UTC时间都用秒数来计 ...
- Problem_A
Problem_A Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Descripti ...
- lua 元表是个啥?
function readOnly(t) local proxy = {} local mt = { __index = t, __newindex = function(t,k,v) error(& ...
- iptables的用例
iptables书写思路顺序 1.协议 icmp 2.哪个功能和目标:过滤,拒绝 3.数据包流向:外到内 4.哪个链适合:越早越好,INPUT 5.源地址和目标地址 练习1.禁止某些主机或网络访问本机 ...
- linux c编程:进程控制(四)进程关系
每一个进程除了有一个进程ID外,还属于一个进程组. 进程组是一个或多个进程的集合,通常情况下,他们是在同一作业中结合起来的,同一进程组的个进程接受来自同一终端的各种信号. 每一个进程组有一个唯一的进 ...
- hibernate 多对多 懒加载问题
报错:org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: net. ...