当前位置: 首页 > news >正文

大渡口网站建设哪家好wordpress 站长

大渡口网站建设哪家好,wordpress 站长,浙江建设三类人员证书查询,杭州临安网站建设文章目录ElasticSearch Script基础介绍基础用法List类型数据新增、删除nested数据新增、删除根据指定条件修改数据根据指定条件修改多个字段数据-查询条件也使用脚本根据指定条件删除nested中子数据数据根据条件删除数据删除之后结果创建脚本#xff0c;通过脚本调用根据条件查… 文章目录ElasticSearch Script基础介绍基础用法List类型数据新增、删除nested数据新增、删除根据指定条件修改数据根据指定条件修改多个字段数据-查询条件也使用脚本根据指定条件删除nested中子数据数据根据条件删除数据删除之后结果创建脚本通过脚本调用根据条件查询出数据删除nested子对象数据ElasticSearch Script基础介绍 语法 script: {lang: ..., source | id: ..., params: { ... } }参数说明 字段说明lang脚本使用的语言默认是painlesssource脚本的核心部分id应用于stored scriptparams传递给脚本使用的变量参数 Script有许多场景使用比如update、update-by-query、reindex等结合scripts语法说lang会有painless、expression、mustache等选择source中有ctx、doc[‘field_name’]、_source等方式取值。 基础用法 List类型数据新增、删除 添加数据到List PUT test/_doc/1{counter : 1,tags : [red]}使用Script添加数据到List POST test/_update/1{script : {source: ctx._source.tags.add(params.tag),lang: painless,params : {tag : blue}}}使用Script删除List数据 POST test/_update/1{script: {source: if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) },lang: painless,params: {tag: blue}}} nested数据新增、删除 新增nested类型数据 POST group/_update/50Bh5H8BmwYplCYFGcvg {script : {source: ctx._source.user.add(params.user),lang: painless,params: {user: {userId:3005,userName:小卡,content:不返回具体数据。}}} }删除nested类型数据 POST group/_update_by_query {script : {source: ctx._source.user.removeIf(item - item.userId params.userId),lang: painless,params: {userId: 3003}},query: {term: {user.content.keyword: {value: 不返回具体数据。}}} }根据指定条件修改数据 SQL含义 update operator_ip_segment_index set owned_network 广电网 where owned_network.keyword 新疆伊犁哈萨克自治州; DSL语法 curl -XPOST http://8.9.60.9:9200/operator_ip_segment_index/_update_by_query -H Content-Type: application/json -d {script:{source:ctx._source.owned_network params.owned_network,params:{owned_network:广电网},lang:painless},query:{term:{owned_network.keyword:新疆伊犁哈萨克自治州}} }根据指定条件修改多个字段数据-查询条件也使用脚本 POST operator_ip_segment_index/_update_by_query {script:{source:ctx._source[ip_type_code]null;ctx._source[start_ipv4_num]null;},query: {bool: {should: {script: {script: {source: long times System.currentTimeMillis()/1000 - 60 * 60 * 24;doc[update_time_seconds].value times, lang: painless}}}}} }根据指定条件删除nested中子数据 数据 {took : 3,timed_out : false,_shards : {total : 1,successful : 1,skipped : 0,failed : 0},hits : {total : {value : 1,relation : eq},max_score : 0.8025915,hits : [{_index : group,_type : _doc,_id : ri8VboYBHSuebtDIpIft,_score : 0.8025915,_source : {groupName : 聊天2群,groupId : 1002,user : [{userName : 小王2,userId : 3002,content : 2作为一级筛选条件单独使用表示表示只返回聚合结果不返回具体数据。},{userName : 小张2,userId : 3003,content : 2作为一级筛选条件单独使用表示表示只返回聚合结果不返回具体数据。},{userName : 小卡,userId : 说啥呢,content : 不返回具体数据。}]}}]} }根据条件删除数据 查询user.content.keyword 不返回具体数据。的数据并删除nested中userId3003的子数据 POST group/_update_by_query {script : {source: ctx._source.user.removeIf(item - item.userId params.userId),lang: painless,params: {userId: 3003}},query: {term: {user.content.keyword: {value: 不返回具体数据。}}} }删除之后结果 {took : 3,timed_out : false,_shards : {total : 1,successful : 1,skipped : 0,failed : 0},hits : {total : {value : 1,relation : eq},max_score : 0.8025915,hits : [{_index : group,_type : _doc,_id : ri8VboYBHSuebtDIpIft,_score : 0.8025915,_source : {groupName : 聊天2群,groupId : 1002,user : [{userName : 小王2,userId : 3002,content : 2作为一级筛选条件单独使用表示表示只返回聚合结果不返回具体数据。},{userName : 小卡,userId : 说啥呢,content : 不返回具体数据。}]}}]} } 创建脚本通过脚本调用 根据条件查询出数据删除nested子对象数据 创建删除脚本,id为delete-nested-test POST _scripts/delete-nested-test {script:{lang:painless,source:ctx._source.user.removeIf(item - item.userId params.userId)} }使用delete-nested-test脚本删除nesteduser.userId等于888的子对象数据 POST group/_update_by_query {script: {id:delete-nested-test,params:{userId:888}},query: {term: {user.content.keyword: {value: 不返回具体数据。}}} }
http://www.tj-hxxt.cn/news/222876.html

相关文章:

  • 做社群的网站有哪些土特产网站建设状况
  • 织梦pc怎么做手机网站长沙装修公司性价比最高的是哪个
  • 郑州网站推广多少钱网站建设中的注册和登录页面
  • 郑州建网站的公司gps建站教程
  • 校园网站建设报价阿里 wordpress插件
  • 北京哪家做网站好如何避免网站被攻击
  • 做推广任务的网站有哪些快速做网站公司
  • 做网站怎么拿框架的原代码网站系统解决方案
  • 网站营销策划公司网站排序
  • 聊城建设路小学网站wordpress 4.8.6
  • 酒厂网站源码工作时做网站使用软件
  • go语言有啥好的网站开发框架汕头企业建站模板
  • 谢岗网站建设廊坊免费推广
  • 网站如何实现微信登录界面学校网站首页设计图片
  • 网站开发电脑配置要求那个网站可以看高速的建设情况
  • 上海网站设计公司联系方式公司简介怎么写吸引人
  • 制作响应式网站wordpress 文章形式
  • 南宁优化网站网络服务长沙专业网站建设公司
  • 网站开发用什么写得比较好google谷歌搜索
  • 代码高亮网站wordpress公众号推送
  • wordpress线报主题seo发外链工具
  • 网站开发可行性研究报告湖州网站开发区火炬手
  • wordpress网站如何清理jswordpress导入网站模板
  • 长沙网站优化推广网络推广费计入什么科目
  • 网站怎么做维护龙游建设局网站
  • 地方网站发展方向西部数码上传网站
  • 网站建设有哪些知识点八爪鱼 wordpress
  • 临海网站开发公司电话链接点开网页表白的网站怎么做的
  • 网站建设实训意见和建议网站开发集
  • 网站搭建的网站设计案例欣赏