MCPcopy Index your code
hub / github.com/TruthHun/DocHub / GetDocInfoForElasticSearch

Method GetDocInfoForElasticSearch

models/DocumentModel.go:446–452  ·  view source on GitHub ↗

查询需要索引的稳定id @param page 页面 @param pageSize 每页记录数 @param startTime 开始时间 @param fields 查询字段 @return infos 文档信息 @return rows 查询到的文档数量 @return err 查询错误

(page, pageSize int, startTime int, fields ...string)

Source from the content-addressed store, hash-verified

444//@return rows 查询到的文档数量
445//@return err 查询错误
446func (this *Document) GetDocInfoForElasticSearch(page, pageSize int, startTime int, fields ...string) (infos []DocumentInfo, rows int64, err error) {
447 if len(fields) == 0 {
448 fields = append(fields, "Id")
449 }
450 rows, err = orm.NewOrm().QueryTable(GetTableDocumentInfo()).Filter("Status__gte", 0).Filter("TimeUpdate__gte", startTime).Limit(pageSize).Offset((page-1)*pageSize).All(&infos, fields...)
451 return
452}

Callers 1

RebuildAllIndexMethod · 0.80

Calls 2

GetTableDocumentInfoFunction · 0.85
AllMethod · 0.80

Tested by

no test coverage detected