开启script:

Scripting settingsedit

The script.disable_dynamic node setting has been replaced by fine-grained script settings described in the scripting
docs
. The following setting previously used to enable dynamic or inline scripts:

script.disable_dynamic: false

It should be replaced with the following two settings in elasticsearch.yml that achieve the same result:

script.inline: on
script.indexed: on

脚本使用,特别注意写法:
curl -XGET 'hm:9200/cars/transactions/_search?search_type=count' -d '
{
    "aggs":{
        "make":{
            "cardinality":{
                "script": "doc[\"make\"].value"
            }
        }
    }
}'

curl -XGET 'hm:9200/cars/transactions/_search?search_type=count' -d '
{
    "aggs":{
        "make":{
            "cardinality":{
                "script": "doc['"'"'make'"'"'].value"
            }
        }
    }
}'


doc[\"dtEventTime\"].date.getHourOfDay()

最新文章

  1. Be Better:遇见更好的自己-2016年记
  2. Html.DropDownLis绑定数据库
  3. (转)详解css3弹性盒模型(Flexbox)
  4. Java——URL和URLConnection
  5. PHP生成迅雷、快车、旋风等软件的下载链接代码实例
  6. 8 Regular Expressions You Should Know
  7. 一模 (2) day2
  8. Configuration Management小结
  9. D2 前端技术论坛总结(上)
  10. bzoj1564
  11. RIP协议两个版本号对不连续子网的支持情况实验
  12. Innobackupex 全备数据库
  13. URI--http://zh.wikipedia.org/wiki/%E7%BB%9F%E4%B8%80%E8%B5%84%E6%BA%90%E6%A0%87%E5%BF%97%E7%AC%A6
  14. android基础5——使用资源
  15. spring -boot s-tarter 详解
  16. 从length与length()开始谈Java
  17. python redis模块的常见的几个类 Redis 、StricRedis和ConnectionPool
  18. 网站内容禁止复制和粘贴、另存为的js代码
  19. ActionMQ集群部署
  20. 个人练习:使用HTML+CSS3制作图片轮播功能(不使用JavaScript)

热门文章

  1. HTTP API 设计指南(中文版) restfull
  2. FileDataSource java的文件操作
  3. Cannot find class for bean with name service
  4. [activiti] Activiti 5.18 的Mybatis版本依赖问题
  5. [原]总结VIM的实用技巧
  6. 01TCP/IP基础
  7. (转)在Winform程序中设置管理员权限及为用户组添加写入权限
  8. Linux命令之WC
  9. C# 多线程网络通信
  10. [JS]深入理解JavaScript系列(4):立即调用的函数表达式