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

Method BuildIndexById

models/ElasticSearchModel.go:330–340  ·  view source on GitHub ↗

根据id查询文档,并创建索引

(id int)

Source from the content-addressed store, hash-verified

328
329//根据id查询文档,并创建索引
330func (this *ElasticSearchClient) BuildIndexById(id int) (err error) {
331 if es, errES := NewDocument().GetDocForElasticSearch(id); errES != nil {
332 err = errES
333 } else {
334 //基本只会有一项
335 for _, item := range es {
336 err = this.BuildIndex(item)
337 }
338 }
339 return
340}
341
342//通过bulk,批量创建/更新索引
343func (this *ElasticSearchClient) BuildIndexByBuck(data []ElasticSearchData) (err error) {

Callers 2

RecoverFromRecycleMethod · 0.95
DocumentProcessFunction · 0.80

Calls 3

BuildIndexMethod · 0.95
NewDocumentFunction · 0.85

Tested by

no test coverage detected