我有一個運行http://elasticsearch.net:9202的本地 ES 容器,我看到一個名為 elasticsearch-dev 的集群,其中有 1 個節點。當我像以下http://elasticsearch.localnet:9202/elasticsearch-dev/*/_search?q=order_number:102811901637201一樣對它進行郵遞員呼叫時, 我得到
{
"error": {
"root_cause": [
{
"type": "index_not_found_exception",
"reason": "no such index",
"resource.type": "index_or_alias",
"resource.id": "elasticsearch-dev",
"index_uuid": "_na_",
"index": "elasticsearch-dev" --------------------------- cluster name is reported back in as index name.
}
],
"type": "index_not_found_exception",
"reason": "no such index",
"resource.type": "index_or_alias",
"resource.id": "elasticsearch-dev",
"index_uuid": "_na_",
"index": "elasticsearch-dev"
},
"status": 404
}
但是,如果我像http://elasticsearch.localnet:9202/*/_search?q=order_number:102811901637201 這樣查詢。如果沒有集群名稱,它可以正常作業(200 回應)。
本地部署的 ES 集群(1 個節點)是否具有不同的 URL 模式?
uj5u.com熱心網友回復:
當您在本地系統中運行 elasticsearch 時,索引或搜索 API 的 URL 采用以下格式
http://{{hostname}}:{{es-port}}/{{index-name}}/_search
在 AWS EC2 實體中運行 Elasticsearch 時,您也可以使用此 URL:
http://{{public-ip-of-cluster}}:{{es-port}}/{{index-name}}/_search
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/423046.html
標籤:
下一篇:過濾帶有腳本條件的條目
