MCPcopy
hub / github.com/google/codesearch / Create

Function Create

index/write.go:61–71  ·  view source on GitHub ↗

64 MB worth of post entries Create returns a new IndexWriter that will write the index to file.

(file string)

Source from the content-addressed store, hash-verified

59
60// Create returns a new IndexWriter that will write the index to file.
61func Create(file string) *IndexWriter {
62 return &IndexWriter{
63 trigram: sparse.NewSet(1 << 24),
64 nameData: bufCreate(""),
65 nameIndex: bufCreate(""),
66 postIndex: bufCreate(""),
67 main: bufCreate(file),
68 post: make([]postEntry, 0, npost),
69 inbuf: make([]byte, 16384),
70 }
71}
72
73// A postEntry is an in-memory (trigram, file#) pair.
74type postEntry uint64

Callers 2

mainFunction · 0.92
buildFlushIndexFunction · 0.85

Calls 2

NewSetFunction · 0.92
bufCreateFunction · 0.85

Tested by 1

buildFlushIndexFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…