Skip to content

Commit c1aab70

Browse files
committed
Add recommendation for separate indexes per repository
- Updated README.md and doc/zoekt.txt to recommend using separate index paths for each repository - This prevents search results from mixing across different projects - Eliminates the need for repo: filters in search queries
1 parent 6abd719 commit c1aab70

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ require("zoekt").setup({
8282
})
8383
```
8484

85+
**Recommendation**: For better search isolation, consider using separate index
86+
paths for each repository. This prevents search results from mixing across
87+
different projects and eliminates the need for `repo:` filters in your queries.
88+
You can set a custom `index_path` per project or use environment variables to
89+
manage multiple indexes.
90+
8591
## Usage
8692

8793
### Commands

doc/zoekt.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@ You can configure different index paths for different projects: >lua
166166
:ZoektSearch handleAuth
167167
<
168168

169+
Recommendation: Use separate index paths for each repository to prevent
170+
search results from mixing across different projects. This eliminates the
171+
need for `repo:` filters in your queries. You can achieve this by:
172+
- Setting a custom `index_path` in your project-specific config
173+
- Using environment variables (e.g., `ZOEKT_INDEX_PATH`)
174+
- Creating a `.nvim.lua` file in each project with custom settings
175+
169176
Environment Variables ~
170177

171178
Set `ZOEKT_INDEX_PATH` to override the default index location: >bash

0 commit comments

Comments
 (0)