search.go 542 B

123456789101112131415161718192021222324
  1. package service
  2. import (
  3. "context"
  4. "go-common/app/service/main/riot-search/model"
  5. )
  6. // SearchIDOnly return ID Only
  7. func (s *Service) SearchIDOnly(c context.Context, arg *model.RiotSearchReq) (res *model.IDsResp) {
  8. res = s.dao.SearchIDOnly(arg)
  9. return
  10. }
  11. // Search return both id and content
  12. func (s *Service) Search(c context.Context, arg *model.RiotSearchReq) (res *model.DocumentsResp) {
  13. res = s.dao.Search(arg)
  14. return
  15. }
  16. // Has return DocId exist
  17. func (s *Service) Has(c context.Context, id uint64) bool {
  18. return s.dao.Has(id)
  19. }