Skip to content

Commit 1a826ba

Browse files
authored
fix(docs): make doc-path index migration conditional (#255)
fresh install向け10枠割当と既存deploymentの実在indexを分離し、list確認後にだけ必要なmutationを行う手順へ修正した。
1 parent 52a6133 commit 1a826ba

4 files changed

Lines changed: 32 additions & 4 deletions

File tree

‎docs/0-requirements.ja.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ Vectorize は hybrid retrieval の dense 側を担う。次の metadata を伴
286286
- documentation path
287287
- commit SHA / file path / file status / commit date / commit author / blob SHA(diff only)
288288

289-
Metadata index(10/10 枠使用):
289+
fresh install向けmetadata index割当(platform上限10枠):
290290

291291
- Pre-filter 対応: repo, type, state, milestone, doc_path
292292
- 将来の pre-filter 用に格納: label_0, label_1, label_2, label_3, assignee_0

‎docs/0-requirements.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Vectorize is the dense side of hybrid retrieval. It stores semantic embeddings a
292292
- wiki page slug + extension (wiki_doc rows)
293293
- commit SHA, file path, file status, commit date, commit author, blob SHA (diff only)
294294

295-
Metadata indexes (10/10 slots used):
295+
Fresh-install metadata index allocation (10/10 platform slots):
296296

297297
- Pre-filter capable: repo, type, state, milestone, doc_path
298298
- Stored for future pre-filter: label_0, label_1, label_2, label_3, assignee_0

‎docs/installation.ja.md‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,27 @@ wrangler deploy
182182

183183
vector 作成後に metadata index を追加した場合、stored hash を reset して次回 cron で全件 re-embed させる。
184184

185-
既存 deployment が `assignee_1` を index 済みなら、`path_prefix` 対応の deploy 前に未使用の将来用 filter 枠を置き換える。
185+
既存 deployment はmetadata indexを変更する前に実在一覧を確認する。
186+
187+
```bash
188+
wrangler vectorize list-metadata-index github-rag-issues
189+
```
190+
191+
`doc_path` がすでに存在すれば変更不要。存在せず、一覧が10件未満なら何も削除せず追加する。
192+
193+
```bash
194+
wrangler vectorize create-metadata-index github-rag-issues --type string --property-name doc_path
195+
```
196+
197+
10枠すべて使用済みで、かつ `assignee_1` が一覧に実在する場合だけ、未使用の将来用 filter 枠を置き換える。
186198

187199
```bash
188200
wrangler vectorize delete-metadata-index github-rag-issues --property-name assignee_1
189201
wrangler vectorize create-metadata-index github-rag-issues --type string --property-name doc_path
190202
```
191203

204+
10枠使用済みでも `assignee_1` が実在しない場合は、別の未使用な将来用 index を明示的に選ぶ。production pre-filterを推測で削除しない。
205+
192206
`doc_path` index 作成前に upsert 済みの vector は path filter の対象にならない。既存 doc に `path_prefix` を使う repository ごとに reset する。metadata index 作成後に追加する新しい固定コーパスには過去分の再 index は不要。
193207

194208
Admin endpoint:

‎docs/installation.md‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,27 @@ Recommended verification flow:
182182

183183
If metadata indexes were created after vectors already existed, reset stored hashes so the next cron run re-embeds everything.
184184

185-
For an existing deployment that still indexes `assignee_1`, replace that unused future-filter slot before deploying `path_prefix` support:
185+
Inspect an existing deployment before changing its metadata indexes:
186+
187+
```bash
188+
wrangler vectorize list-metadata-index github-rag-issues
189+
```
190+
191+
If `doc_path` is already listed, no index mutation is needed. If it is absent and fewer than ten properties are listed, create it without deleting anything:
192+
193+
```bash
194+
wrangler vectorize create-metadata-index github-rag-issues --type string --property-name doc_path
195+
```
196+
197+
Only when all ten slots are occupied **and** `assignee_1` is actually listed, replace that unused future-filter slot:
186198

187199
```bash
188200
wrangler vectorize delete-metadata-index github-rag-issues --property-name assignee_1
189201
wrangler vectorize create-metadata-index github-rag-issues --type string --property-name doc_path
190202
```
191203

204+
If all ten slots are occupied but `assignee_1` is not listed, choose another unused future-filter index deliberately; do not delete a production pre-filter by assumption.
205+
192206
Vectors upserted before `doc_path` was indexed are not path-filterable. Reset each existing repository whose old docs must support `path_prefix`; a new fixed corpus added after the metadata index exists needs no historical re-index.
193207

194208
Admin endpoint:

0 commit comments

Comments
 (0)