Skip to content

Commit 239ece0

Browse files
earayuclaude
andauthored
docs(indexing): §G.5 amendment — index_modality (not modality) for retrieval-modality discriminator (#1728)
Bryce T3.2 implementation (PR #1727 follow-up commit 5325788 on chenyexuan/celery-wave3-cutover) flagged a name collision: D10.h already locked SearchResultMetadata.modality as the content-modality field (Literal["text", "image"]). v3 design pack §G.5 narrative re-used `modality` for "which retrieval modality served this hit" (Literal["vector", "fulltext", "graph", "summary", "vision"]), which would shadow the D10.h field. Architect ack of Bryce's chosen disambiguation: rename the new field to `index_modality`. D10.h `modality` (content) preserved. SearchResultMetadata gains three new fields total: parse_version / index_modality / index_state_per_modality. The two are orthogonal — a hit can be (index_modality="vector", modality="text") or (index_modality="vision", modality="image"). Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent f370dc6 commit 239ece0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

docs/modularization/indexing-redesign-design-pack.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,16 +1085,18 @@ Each `SearchResultItem.metadata` carries:
10851085
class SearchResultMetadata(BaseModel):
10861086
# ... existing fields (chunk_id / section_path / heading_anchor etc) ...
10871087
parse_version: Optional[str] = None # which parse_version served this hit
1088-
modality: Literal["vector","fulltext","graph","summary","vision"]
1088+
index_modality: Optional[Literal["vector","fulltext","graph","summary","vision"]] = None
10891089
index_state_per_modality: Optional[Dict[str, Literal["ACTIVE","FAILED","NOT_ENABLED","INDEXING"]]] = None
10901090
```
10911091

1092+
> **Naming amendment 2026-04-27 (Bryce T3.2 implementation, msg=1a02cbcb)**: the field for "which retrieval modality produced this hit" is **`index_modality`**, not `modality`. D10.h already locked `SearchResultMetadata.modality: Optional[Literal["text", "image"]]` for **content modality** (whether the hit's content is text or an image), and the two concepts are orthogonal — a hit can be `index_modality="vector"` + `modality="text"`, or `index_modality="vision"` + `modality="image"`. The `index_` prefix disambiguates and preserves the D10.h-locked field.
1093+
10921094
Clients (and the agent layer) can:
10931095
- Detect mixed-version results in one response (different modalities show different `parse_version`)
1094-
- Skip a modality that's currently FAILED/INDEXING
1096+
- Skip a retrieval modality that's currently FAILED/INDEXING
10951097
- Decide whether to wait + retry vs proceed with partial coverage
10961098

1097-
Schema-wise this is a small extension of the D10.h `SearchResultMetadata` allowlist (already locked at chunk_id / section_path / heading_anchor; v2 adds `parse_version` and `index_state_per_modality`).
1099+
Schema-wise this is a small extension of the D10.h `SearchResultMetadata` allowlist (already locked at chunk_id / section_path / heading_anchor / source / title / collection_id / document_id / asset_id / mimetype / page_idx / url / modality; v3 adds `parse_version` / `index_modality` / `index_state_per_modality`).
10981100

10991101
---
11001102

0 commit comments

Comments
 (0)