gpt4 book ai didi

elasticsearch - 如何使用 Postman 在 Elastic Search 中插入文档

转载 作者:行者123 更新时间:2023-12-02 22:13:22 42 4
gpt4 key购买 nike

我需要的

  • 我需要插入测试文档。
  • 我已关注链接 https://www.elastic.co/guide/en/elasticsearch/reference/current/_index_and_query_a_document.html

  • 我在这里尝试
       PUT /customer/_doc/1?pretty
    {
    "name": "John Doe"
    }

    Error request body is required



    当我尝试运行 url 时的快照

    1. http://localhost:9200/customer?pretty

    enter image description here
    2. http://localhost:9200/customer/_doc/1?pretty&pretty
    enter image description here

    3. http://localhost:9200/customer/_doc/1?pretty&pretty&name=test
    enter image description here

    任何人都可以建议如何在 Elasticsearch 中插入文档。
  • 任何建议都是最受欢迎的。
  • 最佳答案

    在正文中传递 Json 并更改 URL,如下所示:

    Put into elastic via postman

    关于elasticsearch - 如何使用 Postman 在 Elastic Search 中插入文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48886982/

    42 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com