diff --git a/app/svc/egg_energy/svc_egg_energy.go b/app/svc/egg_energy/svc_egg_energy.go index d62586c..86903b2 100644 --- a/app/svc/egg_energy/svc_egg_energy.go +++ b/app/svc/egg_energy/svc_egg_energy.go @@ -91,6 +91,7 @@ func QueryElasticsearch(req md2.UserEggFlowReq, indexName string) (resp []md2.Us if err != nil { return } + 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 {