elasticsearch开启脚本及使用
2024-10-14 16:44:21
开启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()
最新文章
- Be Better:遇见更好的自己-2016年记
- Html.DropDownLis绑定数据库
- (转)详解css3弹性盒模型(Flexbox)
- Java——URL和URLConnection
- PHP生成迅雷、快车、旋风等软件的下载链接代码实例
- 8 Regular Expressions You Should Know
- 一模 (2) day2
- Configuration Management小结
- D2 前端技术论坛总结(上)
- bzoj1564
- RIP协议两个版本号对不连续子网的支持情况实验
- Innobackupex 全备数据库
- 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
- android基础5——使用资源
- spring -boot s-tarter 详解
- 从length与length()开始谈Java
- python redis模块的常见的几个类 Redis 、StricRedis和ConnectionPool
- 网站内容禁止复制和粘贴、另存为的js代码
- ActionMQ集群部署
- 个人练习:使用HTML+CSS3制作图片轮播功能(不使用JavaScript)
热门文章
- HTTP API 设计指南(中文版) restfull
- FileDataSource java的文件操作
- Cannot find class for bean with name service
- [activiti] Activiti 5.18 的Mybatis版本依赖问题
- [原]总结VIM的实用技巧
- 01TCP/IP基础
- (转)在Winform程序中设置管理员权限及为用户组添加写入权限
- Linux命令之WC
- C# 多线程网络通信
- [JS]深入理解JavaScript系列(4):立即调用的函数表达式