Add subdirectory support to zoekt-webserver

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

Currently, zoekt-webserver only supports one directory per process.

Proposal

We'd like to add subdirectory support to it to implement the suggestion from gitlab-zoekt-indexer!173 (comment 1856564119)

Instead of having a flat structure:

<IndexDir>/54321_v16.00000.zoekt
<IndexDir>/54321_v16.00001.zoekt
<IndexDir>/32402_v16.00000.zoekt

We'd have

<IndexDir>/54/54321/54321_v16.00000.zoekt
<IndexDir>/54/54321/54321_v16.00001.zoekt
<IndexDir>/32/32402/32402_v16.00000.zoekt

That makes deletions as well as generating per-repo stats (size_in_bytes and index_file_count) much more efficient.

Edited by 🤖 GitLab Bot 🤖