2d179af557
The Go client struct expected a nested document object and top-level page/section fields, but the engine returns flat results with metadata in chunk_metadata. This caused empty display for title, type, tags, page, and section in human output mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
607 B
607 B
1. Fix search result struct
- 1.1 Replace nested
Documentstruct with flat fields (Title,DocType,Tags) matching engine JSON keys - 1.2 Add
ChunkMetadata map[string]interface{}field to capturechunk_metadata
2. Fix display logic
- 2.1 Update title/type/tags references in the display loop to use the new flat fields
- 2.2 Extract
pagefromChunkMetadatamap (replacing top-levelPagefield) - 2.3 Extract
section_headerfromChunkMetadatamap (replacing top-levelSectionfield)
3. Verify
- 3.1 Build the client and verify it compiles cleanly