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": { " ...
随机推荐
- 【CF813E】Army Creation(主席树)
[CF813E]Army Creation(主席树) 题面 CF 洛谷 翻译 by ppl 见洛谷 题解 考虑最多只会有\(K\)个相同的数 那么,也就是说,如果一个数会被选 那么,和它相等的数中,在 ...
- 洛谷 P2261 [CQOI2007]余数求和 解题报告
P2261 [CQOI2007]余数求和 题意: 求\(G(n,k)=\sum_{i=1}^n k \ mod \ i\) 数据范围: \(1 \le n,k \le 10^9\) \(G(n,k)\ ...
- 服务器启动脚本 /etc/rc.local
#启动php-frm/home/www/php/sbin/php-fpm #启动搜索引擎/home/www/se/bin/xs-ctl.sh start #启动lighttpd/home/www/li ...
- 【cdq分治】【CF1093E】 Intersection of Permutations
传送门 果然前两天写完咕咕咕那个题的题解以后博客就开始咕咕咕了-- Description 给定整数 \(n\) 和两个 \(1~\sim~n\) 的排列 \(A,B\). \(m\) 个操作,操作有 ...
- Oracle中用exp/imp命令参数详解【转】
Oracle中用exp/imp命令参数详解 [用 exp 数 据 导 出]:1 将数据库TEST完全导出,用户名system 密码manager 导出到D:\daochu.dmp中 exp sy ...
- array_intersect、array_intersect_key、array_intersect_assoc、array_intersect_ukey、array_intersect_uassoc 的用法
<?php // array_intersect 的用法是返回一个关联数组(键是第一个参数数组的键), // 该数组包含了所有在 $array1 中同时也出现在其他参数数组中的值 // 下面的 ...
- hexo搭建个人博客
本文讲述如何用`hexo`搭建个人博客,并托管到`github`.不需要租赁服务器,可完成网站博客的搭建. 安装Hexo安装hexo之前,要先下载安装Node.js和Git,百度搜索找到下载即可.[G ...
- 线程函数对比 win/linux
原文
- golang channel状态表
如果我们查看该表,可以察觉到在操作中可能产生问题的地方.这里有三个可能导致阻塞的操作,以及三 个可能导致程序恐慌的操作. 乍看之下,通道的使用上限制很多,但在检查了这个限制产生的动机并熟悉 了通道的使 ...
- java web程序启动加载 ContextLoaderListener
浅析ContextLoaderListener 大家可能对下面这段代码再熟悉不过了 <context-param> <param-name>contextConfigLocat ...