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-", )