diff --git a/internal/search/handle.go b/internal/search/handle.go index 42e88396..44061308 100644 --- a/internal/search/handle.go +++ b/internal/search/handle.go @@ -135,17 +135,10 @@ func (c *client) Handle(ctx echo.Context) error { return errgo.Wrap(err, "subjectRepo.GetByIDs") } - var idsToGetTags []model.SubjectID - for _, m := range subjects { - if m.MetaTags != "" { - idsToGetTags = append(idsToGetTags, m.ID) - } - } - - tags, err := c.tagRepo.GetByIDs(ctx.Request().Context(), idsToGetTags) - if err != nil { - return errgo.Wrap(err, "tagRepo.GetByIDs") - } + // tags, err := c.tagRepo.GetByIDs(ctx.Request().Context(), ids) + // if err != nil { + // return errgo.Wrap(err, "tagRepo.GetByIDs") + // } var data = make([]ReponseSubject, 0, len(subjects)) for _, id := range ids { @@ -153,10 +146,8 @@ func (c *client) Handle(ctx echo.Context) error { if !ok { continue } - metaTags := tags[id] - if metaTags == nil { - metaTags = []tag.Tag{} - } + // metaTags := tags[id] + var metaTags []tag.Tag for _, t := range strings.Split(s.MetaTags, " ") { metaTags = append(metaTags, tag.Tag{Name: t, Count: 1})