0
我試圖設置一個ES索引。使用curl命令進行Elasticsearch時拒絕連接
我使用安裝elasticsearch:
brew update
brew install elasticsearch
然後我跑
curl -XPOST 'http://127.0.0.1:9200/analytics1' -d '{"settings" : {"index" :{"number_of_shards" : 1,"number_of_replicas" : 1}},"mappings": {"trip-details": {"properties": {"shipment_vehicleNum": {"index": "not_analyzed", "type": "string"},}
它給了我這個錯誤:
curl: (7) Failed to connect to 127.0.0.1 port 9200: Connection refused
我擡頭一對夫婦的計算器答案的這個錯誤有人建議將elasticsearch.yml中的network.host更改爲0.0.0.0 我做到了這一點,但仍然遇到了同樣的錯誤。
我錯過了什麼? 我應該手動安裝Elasticsearch(使用Java)嗎?
從您的問題中不清楚您是否開始彈性搜索 – Val
是的,我沒有啓動我的Elasticsearch服務。 –