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": { " ...
随机推荐
- 【bzoj2893】征服王
Portal -->bzoj2893 Descripiton 给你一个\(n\)个点\(m\)条边的有向图,有一些点是起始点,有一些点是终止点,一次操作可以从一个起始点开始沿着有向图的边走到一个 ...
- winform布局 FlowLayoutPanel的控件
http://www.cnblogs.com/moon-mountain/archive/2011/09/08/2171232.html 1.采用流布局:工具箱里边容器里有一个:FlowLayoutP ...
- JSP2 的自定义标签
在 JSP 中开发标签库只需如下几个步骤 1.开发自定义标签处理类 2.建立一个 *.tld 文件,每个 *.tld 文件对应一个标签库,每个标签库可包含多个标签 3.在 JSP 文件中使用自定义标签 ...
- Codeforces 830B - Cards Sorting 树状数组
B. Cards Sorting time limit per test 1 second memory limit per test 256 megabytes input standard inp ...
- [Java多线程]-ThreadLocal源码及原理的深入分析
ThreadLocal<T>类:以空间换时间提供一种多线程更快捷访问变量的方式.这种方式不存在竞争,所以也不存在并发的安全性问题. //-------------------------- ...
- ASP.NET Core的身份认证框架IdentityServer4--IdentityServer相关文章【记录】
Identity Server 4 预备知识 -- OpenID Connect 简介: 原文地址
- ASP.NET Core的身份认证框架IdentityServer4--(5)自定义用户登录(通过接口登录,无UI版本)
官网接口详解文档地址:文档地址 (PS:可通过接口名称搜索相应接口信息.) 源码地址:https://github.com/YANGKANG01/IdentityServer4-IdentityAut ...
- JAVA多线程提高十二:阻塞队列应用
一.类相关属性 接口BlockingQueue<E>定义: public interface BlockingQueue<E> extends Queue<E> { ...
- [php]禁用缓存
header("Expires: -1"); header("Cache-Control: no_cache"); header("pragma: n ...
- 51nod 1140 矩阵相乘结果的判断
给出三个N*N的矩阵A, B, C,问A * B是否等于C? Input 第1行,1个数N.(0 <= N <= 500) 第2 - N + 1行:每行N个数,对应矩阵A的元素.(0 ...