cmd/godoc: add -index_interval
Updates golang/go#9996. Change-Id: I6112b1c32832aaa6604b096cfe7a8833f092b17a Reviewed-on: https://go-review.googlesource.com/7031 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
bdcea2c1b3
commit
c327a7c00b
|
@ -97,6 +97,7 @@ var (
|
|||
// search index
|
||||
indexEnabled = flag.Bool("index", false, "enable search index")
|
||||
indexFiles = flag.String("index_files", "", "glob pattern specifying index files; if not empty, the index is read from these files in sorted order")
|
||||
indexInterval = flag.Duration("index_interval", 0, "interval of indexing; 0 for default (5m), negative to only index once at startup")
|
||||
maxResults = flag.Int("maxresults", 10000, "maximum number of full text search results shown")
|
||||
indexThrottle = flag.Float64("index_throttle", 0.75, "index throttle value; 0.0 = no time allocated, 1.0 = full throttle")
|
||||
|
||||
|
@ -219,6 +220,7 @@ func main() {
|
|||
}
|
||||
corpus.IndexFiles = *indexFiles
|
||||
corpus.IndexThrottle = *indexThrottle
|
||||
corpus.IndexInterval = *indexInterval
|
||||
if *writeIndex {
|
||||
corpus.IndexThrottle = 1.0
|
||||
corpus.IndexEnabled = true
|
||||
|
|
Loading…
Reference in New Issue