Skip to content

search: make max file size configurable

Created by: stefanhengl

Zoekt and symbols service both define a limit on the file size.

Zoekt's limit is hardcoded to 1MiB with a comment that it should match the settings of the symbol service

https://sourcegraph.sourcegraph.com/github.com/sourcegraph/zoekt@09ac1ff91e8c9321369e7b639d45e291c04ed514/-/blob/cmd/zoekt-sourcegraph-indexserver/main.go?L570:14

Symbol service, on the other hand, has a configurable limit with default of 1MB

https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/cmd/symbols/types/types.go?L85

We should offer the file limit as config value in site config and sync the settings for both symbol service and Zoekt. There has been at least 1 customer that requested this limit to be configurable.