From 701e7c75b1ae2198a1e71014deeebf6932217d22 Mon Sep 17 00:00:00 2001 From: 97694731 <97694731@qq.com> Date: Fri, 8 May 2026 16:51:25 +0800 Subject: [PATCH] =?UTF-8?q?ES=E5=85=AC=E7=BD=91IP-->=E5=86=85=E7=BD=91IP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/main.go b/main.go index 5fbda6a..44be78a 100644 --- a/main.go +++ b/main.go @@ -163,34 +163,16 @@ func main() { //} //defer bookCenter.db.Close() // ======================= 新增:初始化 ES ============================ - /////** 旧ES,ES0 **/ + /** 本地测试公网IP **/ //esClient, err := es.NewESClient( - // []string{"http://103.236.91.138:9200"}, + // []string{"http://36.212.12.92:9527"}, // "elastic", - // "5mRDIUg52VC0fp14nw-F", + // "+Tz5qR_KushZ-bPgZ_H-", //) - ///** ES,ES1 **/ - //esClient, err := es.NewESClient( - // []string{"http://103.236.74.207:9200"}, - // "elastic", - // "y3h2fdYyrXewkSrY6uhh", - //) - - /** 新ES,任务2 **/ - //esClient, err := es.NewESClient( - // []string{"http://localhost:9200"}, - // "elastic", - // "zDzSXel3PFwx9=6Ybmqv", - //) - /** ES2 本地测试 **/ - //esClient, err := es.NewESClient( - // []string{"https://103.236.91.138:9200"}, - // "elastic", - // "7AYdoW=mn3yHZ*3A=Z1x", - //) + /** 线上使用内网IP **/ esClient, err := es.NewESClient( - []string{"http://36.212.12.92:9527"}, + []string{"http://192.168.1.211:9527"}, "elastic", "+Tz5qR_KushZ-bPgZ_H-", )