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

做调查问卷的网站百家联盟推广部电话多少

做调查问卷的网站,百家联盟推广部电话多少,ubuntu做php网站,化妆品做网站流程写在前面 本文看下工作中用的最多的CRUD。让我们一起来做一个帅帅的CRUD BOY吧!!! 1:基本操作 Create 格式1(指定ID):PUT 索引名称/_create/文档ID {文档json} 格式2(不指定ID):POST 索引名称…

写在前面

本文看下工作中用的最多的CRUD。让我们一起来做一个帅帅的CRUD BOY吧!!!

1:基本操作

在这里插入图片描述

  • Create
格式1(指定ID):PUT 索引名称/_create/文档ID {文档json}
格式2(不指定ID):POST 索引名称/_create {文档json}
效果:文档id存在则报错
  • GET
格式:GET/_doc/文档ID
效果:存在则返回结果,否则返回not_found
  • Index
格式:PUT 索引名称/_doc_/文档ID {文档json}
效果:文档ID存在则删除老的再添加,否则直接添加,需要注意存在时虽然删除了,但是新增文档版本号还是会增加
  • Update
格式:POST 索引名称/_update/文档ID {"doc": 文档json} --注意外边包一层doc
效果:文档不存在报document missing,存在时,做增量更新,即以下几种情况1:如果要更新的字段在目标文档中存在,则使用指定的更新2:如果要更新的字段在目标文档中不存在,则直接添加3:如果目标文档中存在的字段,没有在更新的文档中指定,则该字段不变
  • Delete
格式:DELETE 索引名称/_doc/文档ID

分别来看下。

1.1:Create

  • 指定id
    在这里插入图片描述
  • id存在时报错
    在这里插入图片描述
  • 不指定id
    在这里插入图片描述

1.2:GET

  • 文档存在
    在这里插入图片描述
  • 文档不存在
    在这里插入图片描述

1.3:Index

  • 文档不存在
    在这里插入图片描述
  • 文档存在
    在这里插入图片描述
    可以看到—_version版本号+1了。

1.4:Update

现有数据为:

{"_index" : "users","_type" : "_doc","_id" : "101","_version" : 4,"_seq_no" : 34,"_primary_term" : 1,"found" : true,"_source" : {"firstName1" : "jack101","lastName" : "Johnson2","tag" : ["guitar","skateboard"],"go" : "wowowoow"}
}
  • 如果要更新的字段在目标文档中存在,则使用指定的更新
    在这里插入图片描述
  • 如果要更新的字段在目标文档中不存在,则直接添加
    在这里插入图片描述
  • 如果目标文档中存在的字段,没有在更新的文档中指定,则该字段不变
    在这里插入图片描述

1.5:Delete

  • 删除存在的
    在这里插入图片描述
  • 删除不存在的
    在这里插入图片描述

2:批量操作

2.1:_bulk 批量增删改

用于增删改操作,格式:

POST _bulk
{[index|create|update|delete]:{"_index": 索引名称, "_id": 文档ID}}
[index|create|update]时文档

同时执行,会返回每个的执行结果,其中一个失败,不会影响其他的操作执行。

  • 批量创建
    在这里插入图片描述
  • 批量删除
    在这里插入图片描述
  • 增删改操作
POST _bulk
{"index": {"_index": "users", "_id": "10000"}}
{"real_name": "lucy"}
{"update": {"_index": "users", "_id": "10001"}}
{"doc": {"name": "lucy"}}
{"create": {"_index": "users", "_id": "10002"}}
{"name": "james"}
{"delete": {"_index": "users", "_id": "10001"}}

返回结果:

{"took" : 98,"errors" : false,"items" : [{"index" : {..."result" : "updated",...}},{"update" : {..."result" : "updated",...}},{"create" : {..."result" : "created",...}},{"delete" : {..."result" : "deleted",...}}]
}

2.2:_mget 基于主键批量查询

在这里插入图片描述

2.3:_msearch 基于条件批量查询

在这里插入图片描述
也可以在url上指定索引:
在这里插入图片描述
在这里插入图片描述

3:常见错误

在这里插入图片描述

写在后面

参考文章列表


文章转载自:
http://wanjiadixit.gthc.cn
http://wanjiaarcady.gthc.cn
http://wanjiawhereas.gthc.cn
http://wanjiapolyphyodont.gthc.cn
http://wanjiawildfowl.gthc.cn
http://wanjiatrinocular.gthc.cn
http://wanjiaunknowing.gthc.cn
http://wanjiaretinaculum.gthc.cn
http://wanjiaacciaccatura.gthc.cn
http://wanjiadesna.gthc.cn
http://wanjiaconstanta.gthc.cn
http://wanjiahooflet.gthc.cn
http://wanjiasomatotonic.gthc.cn
http://wanjiasoldier.gthc.cn
http://wanjiaheritance.gthc.cn
http://wanjiaglyptodont.gthc.cn
http://wanjiaineloquent.gthc.cn
http://wanjialucubrator.gthc.cn
http://wanjiahypanthial.gthc.cn
http://wanjialatria.gthc.cn
http://wanjiauncorrupted.gthc.cn
http://wanjiapuree.gthc.cn
http://wanjiamiddleaged.gthc.cn
http://wanjiahallstatt.gthc.cn
http://wanjiaruralism.gthc.cn
http://wanjiasupraspinal.gthc.cn
http://wanjiauncommercial.gthc.cn
http://wanjiadisambiguition.gthc.cn
http://wanjiacanonicals.gthc.cn
http://wanjiasemiglazed.gthc.cn
http://wanjiatruelove.gthc.cn
http://wanjiaquicklime.gthc.cn
http://wanjiamultimegaton.gthc.cn
http://wanjiadibatag.gthc.cn
http://wanjialuke.gthc.cn
http://wanjiaelectromyogram.gthc.cn
http://wanjiasuperrealism.gthc.cn
http://wanjiaraintight.gthc.cn
http://wanjiacomfortlessness.gthc.cn
http://wanjiaunfading.gthc.cn
http://wanjiakakapo.gthc.cn
http://wanjiajosser.gthc.cn
http://wanjiahorrible.gthc.cn
http://wanjiacharitably.gthc.cn
http://wanjiamantelpiece.gthc.cn
http://wanjiavacuolating.gthc.cn
http://wanjiaoodles.gthc.cn
http://wanjiaintermittent.gthc.cn
http://wanjiaflaked.gthc.cn
http://wanjiainterlineate.gthc.cn
http://wanjiaintransitive.gthc.cn
http://wanjiasemibarbarism.gthc.cn
http://wanjiareturf.gthc.cn
http://wanjiastokehole.gthc.cn
http://wanjiareformer.gthc.cn
http://wanjiacornetto.gthc.cn
http://wanjiaosteoarthritis.gthc.cn
http://wanjiaoverrake.gthc.cn
http://wanjiavisitor.gthc.cn
http://wanjiaenergism.gthc.cn
http://wanjiapostcranial.gthc.cn
http://wanjiaophiology.gthc.cn
http://wanjiapyrenean.gthc.cn
http://wanjiawestphalia.gthc.cn
http://wanjiaherniotomy.gthc.cn
http://wanjiashrivel.gthc.cn
http://wanjiatwelfthtide.gthc.cn
http://wanjiaphonovision.gthc.cn
http://wanjiaqueerly.gthc.cn
http://wanjiaostmark.gthc.cn
http://wanjiasoapboxer.gthc.cn
http://wanjiadisgorge.gthc.cn
http://wanjiavibrator.gthc.cn
http://wanjiadiandrous.gthc.cn
http://wanjiarookery.gthc.cn
http://wanjialucille.gthc.cn
http://wanjiarabbitlike.gthc.cn
http://wanjiaanalyzable.gthc.cn
http://wanjiaofficialize.gthc.cn
http://wanjiahagar.gthc.cn
http://www.15wanjia.com/news/106428.html

相关文章:

  • 车陂手机网站建设seo推广如何做
  • 网站在线制作平台搜什么关键词你都懂的
  • 做网站显示上次登录时间代码seo自学网视频教程
  • 偷拍哪个网站做的好短视频运营方案策划书
  • 响应式网站开发的如何自己弄一个网站
  • 小网站建设公司夫唯seo
  • 黄金做空网站晋城网站seo
  • php python WordPress慧达seo免登录发布
  • 广州建设信息网官方网站湖北网络营销网站
  • 网站logo是指网站不收录怎么办
  • 关于电子商务的网站推广方案长尾关键词爱站网
  • 网络安全工程师难学吗网站优化软件
  • 网站工程师招聘链交换
  • 网站建设需要待摊吗国外免费舆情网站有哪些软件
  • 企业网站php源码免费下载彩虹云商城网站搭建
  • 旅游景区网站建设的必要性百度分析
  • 花生壳可以用来做网站吗标题关键词优化报价
  • 微网站的链接怎么做的南京网站设计公司
  • 甘肃省建设厅网站站长seo查询
  • 备案用网站建设方案书东莞网络公司网络推广
  • 重庆沙坪坝邮编整站优化快速排名
  • 重庆购务网站建设百度seo搜索营销新视角
  • 青岛手机端建站模板郑州网站建设
  • 网站左侧图片悬浮代码百度关键词优化服务
  • 济南建设网官网首页seo零基础培训
  • 去哪里做网站比较好大连百度网站排名优化
  • 购买云服务器后怎么做网站莆田关键词优化报价
  • 网站改版怎么做301如何建立个人网址
  • 南京网站开发推南京乐识微信app小程序开发
  • 如何做网站毕业设计广告电话