From 94983d8468f82df585585a074adb40e433814a91 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 27 Dec 2024 19:19:42 +0800 Subject: [PATCH] update --- app/svc/egg_energy/svc_egg_energy.go | 2 +- app/task/svc/svc_egg_energy_automatic_scoring_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/svc/egg_energy/svc_egg_energy.go b/app/svc/egg_energy/svc_egg_energy.go index 1fc916e..86903b2 100644 --- a/app/svc/egg_energy/svc_egg_energy.go +++ b/app/svc/egg_energy/svc_egg_energy.go @@ -91,7 +91,7 @@ func QueryElasticsearch(req md2.UserEggFlowReq, indexName string) (resp []md2.Us if err != nil { return } - doc.IndexId = hit.Index + doc.IndexId = hit.Id resp = append(resp, doc) } total = searchResult.Hits.TotalHits.Value diff --git a/app/task/svc/svc_egg_energy_automatic_scoring_test.go b/app/task/svc/svc_egg_energy_automatic_scoring_test.go index 4724d68..b024e0b 100644 --- a/app/task/svc/svc_egg_energy_automatic_scoring_test.go +++ b/app/task/svc/svc_egg_energy_automatic_scoring_test.go @@ -8,8 +8,8 @@ import ( ) func TestCreateEsIndex(t *testing.T) { - es.Init("http://123.57.140.192:9200", "elastic", "fnuo123") - nextWeekIndex := "egg_energy_user_egg_score_202453" + es.Init("http://120.55.48.175:9200", "elastic", "fnuo123") + nextWeekIndex := "egg_energy_user_egg_score_202452" for { err := es.CreateIndexIfNotExists(nextWeekIndex, md.EggEnergyUserEggScoreEsMapping) if err != nil {