【发布时间】:2023-03-16 09:35:01
【问题描述】:
我需要什么
我需要插入测试文档。
我已关注链接https://www.elastic.co/guide/en/elasticsearch/reference/current/_index_and_query_a_document.html
我在这里尝试
PUT /customer/_doc/1?pretty
{
"name": "John Doe"
}
需要错误请求正文
当我尝试运行 url 时的快照
1.http://localhost:9200/customer?pretty
2.http://localhost:9200/customer/_doc/1?pretty&pretty
3.http://localhost:9200/customer/_doc/1?pretty&pretty&name=test
任何人都可以建议如何在 Elastic 搜索中插入文档。
- 欢迎提出任何建议。
【问题讨论】:
-
Body请求选项卡中有什么? -
你能告诉我如何通过邮递员插入文件。
-
您需要在请求正文中插入 JSON 文档,并确保使用
application/json值指定Content-Type请求标头。
标签: elasticsearch