MCPcopy Create free account
hub / github.com/couchbase/cbft / documentMatchHandler

Method documentMatchHandler

pindex_bleve_delete.go:36–49  ·  view source on GitHub ↗
(hit *search.DocumentMatch)

Source from the content-addressed store, hash-verified

34}
35
36func (dph *docDelHandler) documentMatchHandler(hit *search.DocumentMatch) error {
37 if hit != nil {
38 dph.batch.Delete(hit.ID)
39 }
40 if dph.batch.Size() >= deleteBatchSize || hit == nil {
41 err := dph.delh.index.Batch(dph.batch)
42 if err != nil {
43 return err
44 }
45 dph.delh.totDelCount += dph.batch.Size()
46 dph.batch.Reset()
47 }
48 return nil
49}
50
51func (d *delByQueryHandler) MakeDocumentMatchHandler(
52 ctx *search.SearchContext) (search.DocumentMatchHandler, bool, error) {

Callers

nothing calls this directly

Calls 4

SizeMethod · 0.80
DeleteMethod · 0.45
BatchMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected