Bump the file size limit to 2 MB
The largest .cc file in the chromium tree is 1157895 bytes
Fixes #107.
Change-Id: I4c1013366168ae1a31dc456fb423a289126274dd
diff --git a/cmd/flags.go b/cmd/flags.go
index 3222d5d..27cca86 100644
--- a/cmd/flags.go
+++ b/cmd/flags.go
@@ -38,7 +38,7 @@
}
var (
- sizeMax = flag.Int("file_limit", 128*1024, "maximum file size")
+ sizeMax = flag.Int("file_limit", 2<<20, "maximum file size")
trigramMax = flag.Int("max_trigram_count", 20000, "maximum number of trigrams per document")
shardLimit = flag.Int("shard_limit", 100<<20, "maximum corpus size for a shard")
parallelism = flag.Int("parallelism", 4, "maximum number of parallel indexing processes.")
diff --git a/toc.go b/toc.go
index 97799a2..c956e94 100644
--- a/toc.go
+++ b/toc.go
@@ -38,7 +38,8 @@
// 6: Include '#' into the LineFragment template
// 7: Record skip reasons in the index.
// 8: Record source path in the index.
-const FeatureVersion = 8
+// 9: Bump default max file size.
+const FeatureVersion = 9
type indexTOC struct {
fileContents compoundSection