Documentation
¶
Overview ¶
package build implements a more convenient interface for building zoekt indices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDir = filepath.Join(os.Getenv("HOME"), ".zoekt")
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder manages (parallel) creation of uniformly sized shards. The builder buffers up documents until it collects enough documents and then builds a shard and writes.
func NewBuilder ¶
NewBuilder creates a new Builder instance.
type Options ¶
type Options struct {
// IndexDir is a directory that holds *.zoekt index files.
IndexDir string
// SizeMax is the maximum file size
SizeMax int
// Parallelism is the maximum number of shards to index in parallel
Parallelism int
// ShardMax sets the maximum corpus size for a single shard
ShardMax int
// TrigramMax sets the maximum number of distinct trigrams per document.
TrigramMax int
// RepositoryDescription holds names and URLs for the repository.
RepositoryDescription zoekt.Repository
// SubRepositories is a path => sub repository map.
SubRepositories map[string]*zoekt.Repository
// Path to exuberant ctags binary to run
CTags string
// If set, ctags must succeed.
CTagsMustSucceed bool
// Write memory profiles to this file.
MemProfile string
// LargeFiles is a slice of glob patterns, including ** for any number
// of directories, where matching file paths should be indexed
// regardless of their size. The full pattern syntax is here:
// https://github.com/bmatcuk/doublestar/tree/v1#patterns.
LargeFiles []string
}
Options sets options for the index building.
func (*Options) HashOptions ¶
HashOptions creates a hash of the options that affect an index.
func (*Options) IgnoreSizeMax ¶
IgnoreSizeMax determines whether the max size should be ignored.
func (*Options) IncrementalSkipIndexing ¶
IncrementalSkipIndexing returns true if the index present on disk matches the build options.
func (*Options) SetDefaults ¶
func (o *Options) SetDefaults()
SetDefaults sets reasonable default options.
Click to show internal directories.
Click to hide internal directories.