Add setting to configure TrigramMax

Background

TrigramMax limit, which controls the maximum number of unique trigrams that can be indexed per file. If a file has more trigrams than this limit, then only the filename gets indexed. Zoekt's default TrigramMax is 20,000 unique trigrams per file. When a file exceeds this limit:

  • ✅ The filename is still indexed. The filename search works
  • ❌ The file content is NOT indexed. The content search does not work.

GitLab currently does NOT configure this value, so it uses Zoekt's default of 20,000.

Proposal

Add a json zoekt application setting to configure Zoekt's TrigramMax limit. It should be of integer type. Default will be 20000.

Edited Dec 18, 2025 by Ravi Kumar
Assignee Loading
Time tracking Loading