docvalue and fielddata
大部分字段类型默认被索引的(inverted index),可以被搜索
search: 哪个文档有这个词
sort&aggregations: look up the document and find the terms that it has in a field.这个文档的这个字段的值是什么
doc_values
- 磁盘上的数据结构,在文档索引的时候建立,数据可以被访问。
- 和_source存的值是一样的,采用column-oriented fashion,更高效的排序和聚合
- doc_values的默认值是true,如果这个字段不需要排序和聚合,不需要在脚本里访问,可以禁用doc_values来节约磁盘空间,
仍然可以被查询 - 可以被分词类型不支持doc_values
"session_id": {
"type": "keyword",
"doc_values": false
}
fielddata
- text fields 不支持doc_values,
- text使用fielddata,一种在查询时期生成在缓存里的数据结构
- 当字段在首次sort,aggregations,or in a script时创建,读取磁盘上所有segment的的倒排索引,反转 term<->doc 的关系,加载到jvm heap,it remains there for the lifetime of the segment.
- 很耗内存,默认禁用fielddata
- text field 是先分词再索引的,因此,应该使用不分词的keyword用来聚合
curl -XPUT 'localhost:9200/my_index?pretty' -H 'Content-Type: application/json' -d'
{
"mappings": {
"my_type": {
"properties": {
"my_field": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
}
}
}
}
}
'
docvalue and fielddata的更多相关文章
- Es官方文档整理-3.Doc Values和FieldData
Es官方文档整理-3.Doc Values和FieldData 1.Doc Values 聚合使用一个叫Doc Values的数据结构.Doc Values使聚合更快.更高效且内存友好. Doc Va ...
- Fielddata is disabled on text fields by default. Set fielddata=true on [gender] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memor
ES进行如下聚合操作时,会报如题所示错误: ➜ Downloads curl -XPOST 'localhost:9200/bank/_search?pretty' -d ' { "size ...
- (转载)es进行聚合操作时提示Fielddata is disabled on text fields by default
原文地址:http://blog.csdn.net/u011403655/article/details/71107415 根据es官网的文档执行 GET /megacorp/employee/_se ...
- es fielddata理解
在es中,text类型的字段使用一种叫做fielddata的查询时内存数据结构.当字段被排序,聚合或者通过脚本访问时这种数据结构会被创建.它是通过从磁盘读取每个段的整个反向索引来构建的,然后存存储在j ...
- (转)es进行聚合操作时提示Fielddata is disabled on text fields by default
根据es官网的文档执行 GET /megacorp/employee/_search { "aggs": { "all_interests": { " ...
- es进行聚合操作时提示Fielddata is disabled on text fields by default
在进行派粗前,先执行以下操作 { "properties": { "updatedate": { "type": "text&qu ...
- python Fielddata is disabled on text fields
# 执行https://www.elastic.co/guide/cn/elasticsearch/guide/current/_aggregation_test_drive.html中的例子时报错F ...
- Kibana error " Fielddata is disabled on text fields by default. Set fielddata=true on [publisher] ..."
Reason of this error:Fielddata can consume a lot of heap space, especially when loading high cardina ...
- 56.fielddata filter的细粒度内存加载控制
语法: POST /test_index/_mapping/test_type { "properties": { "test_field": { " ...
随机推荐
- redis的自带VM(虚拟内存)
Redis支持采用VM技术,以达到当数据超过设置的可使用的物理内存的时候能够正常运行.当数据超过物理内存的时候,把一部分数据写入磁盘中的一块空间来代替物理内存. vm-enabled no ...
- LOJ #6036.「雅礼集训 2017 Day4」编码 Trie树上2-sat
记得之前做过几道2-sat裸体,以及几道2-sat前缀优化建图,这道题使用了前缀树上前缀树优化建图.我们暴力建图肯定是n^2级别的,那么我们要是想让边数少点,就得使用一些骚操作.我们观察我们的限制条件 ...
- Servlet3.0 新特性
Servlet3.0 的注解 Servlet 允许开发人员采用注解的方式来配置 Servlet.Filter.Listener. Servlet3.0 规范在 javax.servlet.annota ...
- JavaScript中callee与caller,apply与call解析
1. arguments.callee 1.1 解释 返回正被执行的 Function 对象,也就是所指定的 Function 对象的正文. 1,.2 说明 callee 属性的初始值就是正被执行的 ...
- swiper.js的使用
点击api文档地址, (1)图片轮播banner <script src="js/jquery-2.1.4.min.js"></script> <sc ...
- [洛谷P2745] [USACO5.3]窗体面积Window Area
洛谷题目链接:[USACO5.3]窗体面积Window Area 题目描述 你刚刚接手一项窗体界面工程.窗体界面还算简单,而且幸运的是,你不必显示实际的窗体.有 5 种基本操作: 创建一个新窗体 将窗 ...
- .net core 中 identity server 4 之术语
id4的职责: 保护你的资源 通过本地 账户库(Account Store)或者外部身份提供其 认证用户 提供Session管理以及SSO 管理和认证客户端 发行身份及访问Token给客户端 验证To ...
- Elasticsearch技术解析与实战(七)Elasticsearch批量操作
批量查询 1.如果查询的document是不同index下的不同type种的话 GET /_mget { "docs" : [ { "_index" : &qu ...
- 12款jQuery幻灯片插件和幻灯片特效教程
jQuery 使用简单灵活,同时还有许多成熟的插件可供选择,它可以帮助你在项目中加入一些非常好的效果.滑块和幻灯片效果是常用的内容展示方式之一,这是一种在有限的网页空间内展示系列项目时非常好的方法.今 ...
- 【BZOJ】1036 [ZJOI2008]树的统计Count
[算法]树链剖分+线段树 [题解]模板题,见http://www.cnblogs.com/onioncyc/p/6207462.html 调用线段数时要用新编号pos[i] !!! #include& ...