zoukankan      html  css  js  c++  java
  • Elasticsearch doc_value认识

    一、doc_value是什么

    1. 绝大多数的fields在默认情况下是indexed,因此字段数据是可被搜索的。倒排索引中按照一定顺序存放着terms供搜索,当命中搜索时,返回包含term的document。

    2. 当Sorting、aggregations、scripts access to field这三种情况的时候,我们需要另外的data access模式。这种模式和上述在terms中寻找term并且返回document是不同的

    3. Doc values 为on-disk 数据结构,在document索引时被创建。Doc values 存放的values和 _source这个meta-Fields是一致的。支持除了analyzed string 以外的所有类型。

    二、doc_value特性

    1. doc_value 默认情况下是enable的。
    2. column-oriented 存放field,以便sort、aggregate、access the field from a script
    3. disable doc_value:

      PUT my_index
      {
      "mappings": {
      "my_type": {
        "properties": {
          "mystring": { 
            "type":       "keyword",
            "doc_values": false
          }
        }
      }
      }
      }

    三、disable doc_value会怎样

    • 消极影响:sort、aggregate、access the field from script将会无法使用
    • 积极影响:节省磁盘空间

    http://blog.csdn.net/yangwenbo214/article/details/54346119

  • 相关阅读:
    msql 计算连续签到天数
    jetty启动常用命令
    nginx负载均衡, 配置地址带端口
    IDEA java 代码格式化统一
    Linux下安装Zookeeper
    nexus admin 从文件角度进行密码重置
    Monkey测试
    接口测试
    我的IT之路
    cookie 操作(转载)
  • 原文地址:https://www.cnblogs.com/ydxblog/p/8303790.html
Copyright © 2011-2022 走看看