elasticsearch871 如何使用postman创建索引
可以按照以下步骤使用Postman创建Elasticsearch索引:
- 打开Postman,选择POST请求方法。
- 输入Elasticsearch的URL地址,例如:http://localhost:9200/my-index。
- 在请求主体中选择“raw”,并选择格式为“JSON”。
- 输入以下JSON内容:
{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
"properties": {
"name": {
"type": "text"
},
"age": {
"type": "integer"
}
}
}
}
- 点击“Send”按钮,即可创建索引。
注意:在执行此操作之前,请确保Elasticsearch已经启动并运行在本地计算机上。
原文地址: https://www.cveoy.top/t/topic/eIO8 著作权归作者所有。请勿转载和采集!