“error“ : “no handler found for uri [/test1/_doc/1/update?pretty=true] and method [POST]或者[GET]“

这篇具有很好参考价值的文章主要介绍了“error“ : “no handler found for uri [/test1/_doc/1/update?pretty=true] and method [POST]或者[GET]“。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

“error” : “no handler found for uri [/test1/_doc/1/update?pretty=true] and method [POST]或者[GET]”

一、GET报错原因:type被弃用!

PUT /test1/type/1
{
"name":"李华", 
"age":18 
}

报错:

"error" : "no handler found for uri [/test1/type/1?pretty=true] and method [PUT]"

解决办法:将type修改为_doc,默认的数据类型

PUT /test1/_doc/1
{
"name":"李华", 
"age":18 
}

PUT创建新的索引成功

{
  "_index" : "test1",
  "_id" : "1",
  "_version" : 1,
  "result" : "created",
  "_shards" : {
    "total" : 2,
    "successful" : 1,
    "failed" : 0
  },
  "_seq_no" : 0,
  "_primary_term" : 1
}

二、POST报错原因:语法更新,原来的语法有可能是错的

POST /test1/_doc/1/_update
{
  "doc":{
    "name":"肖肖"
  }
}

报错:

"error" : "no handler found for uri [/test1/_doc/1/update?pretty=true] and method [POST]

解决办法:

POST /test1/_update/1/
{
  "doc":{
    "name":"肖肖"
  }
}

成功修改更新:文章来源地址https://www.toymoban.com/news/detail-522616.html

{
  "_index" : "test1",
  "_id" : "1",
  "_version" : 2,
  "result" : "updated",
  "_shards" : {
    "total" : 2,
    "successful" : 1,
    "failed" : 0
  },
  "_seq_no" : 4,
  "_primary_term" : 1
}

到了这里,关于“error“ : “no handler found for uri [/test1/_doc/1/update?pretty=true] and method [POST]或者[GET]“的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • python报错:ERROR: No matching distribution found for

      使用pip安装包时提示报错如下: ERROR: Could not find a version that satisfies the requirement package (from versions: none) ERROR: No matching distribution found for package 大多数是网络问题,替换使用国内的镜像来源加速即可。 打开cmd 输入  按回车执行命令后,安装成功。 例如:  

    2024年02月15日
    浏览(43)
  • 已解决ERROR: No matching distribution found for xpinyin

    已解决(pip使用阿里云镜像安装第三方模块失败)ERROR: Could not find a version that satisfies the requirement xpinyin (from versions: none) ERROR: No matching distribution found for xpinyin WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS w

    2023年04月20日
    浏览(38)
  • ERROR: No matching distribution found for gradio>=3.23

    今天运行chatGPTweb项目的时候 跟下载其他包时候一样使用清华源下载的时候,pip install gradio==3.23 -i https://pypi.python.org/pypi 然后, 报错了 。 国内的镜像源还没有更新到 gradio=3.23,所以需要科学上网,手动去pypi官网下载whl,然后通过whl下载即可。 1.从官网中下载gradio编译的pyd文

    2024年02月11日
    浏览(47)
  • 已解决ERROR: No matching distribution found for gradio==3.23

    已解决stderr: ERROR: Could not find a version that satisfies the requirement gradio==3.23 ERROR: No matching distribution found for gradio==3.23 粉丝群里面的一个小伙伴遇到问题跑来私信我,想用pip安装gradio ,但是发生了报错(当时他心里瞬间凉了一大截,跑来找我求助,然后顺利帮助他解决了,顺便记

    2023年04月18日
    浏览(36)
  • jenkins构建时,报错ERROR: No matching distribution found for pywin32==305

    最近用jenkin构建了一个任务,控制台输出,出现如下报错信息: ERROR: Could not find a version that satisfies the requirement pywin32==305 (from versions: none) ERROR: No matching distribution found for pywin32==305 Build step \\\'Execute shell\\\' marked build as failure Finished: FAILURE   原因: requirement是需要导入的依赖包文件

    2023年04月27日
    浏览(35)
  • python3安装及pip3 报ERROR: No matching distribution found for

    python3 pip Install Error: No matching distribution found for 安装openssl 安装python3 可能会报错: zipimport.ZipImportError: can’t decompress data 解决方法:

    2024年02月14日
    浏览(36)
  • 解决报错ERROR: No matching distribution found for torchvision==0.11.2+cu111

    目录 一、猜测 二、验证 三、解决方案 四、检验 该报错是在按官网方法用指令: 安装pytorch时出现的,以下是分析: 这个错误提示表明在指令提供的下载网址上没有找到符合要求的torchvision软件包版本,需要安装符合要求的版本。问题可能出在指定的版本号(0.11.2+cu111),这

    2024年02月11日
    浏览(34)
  • Python安装selenium时报错:ERROR: No matching distribution found for selenium 附解决方法

    报错如下: 通过该方法可以成功解决报错:

    2024年02月05日
    浏览(42)
  • PIP安装python包,报ERROR: No matching distribution found for XXXXX 问题的处理

    最近在安装python包的时候老是报一个错误: 不管怎么装,都装不上,不同的包都是报这个错误,在网上找到的内容大多都相同,说是重新安装,或者加参数,结果全没用,最后准备排查python版本的问题,准备降级试一下。 因为之前安装的时候,是安装的3.10.2,以为是包不支

    2024年02月12日
    浏览(29)
  • 记一次pip下载包报错ERROR: No matching distribution found for xxx时的解决方案

    前言 当我们使用python自带的pip安装一些包时,可能会报以下错误: 出现这种情况有三种可能: 第一种可能: pip的版本过低,需要升级一下,可以执行以下命令进行尝试 第二种可能: 考虑可能是网速的原因,这时可以采用国内的镜像源来加速 第三种可能: 检查下是否开启

    2024年02月11日
    浏览(51)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包