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>
15 lines
607 B
Markdown
15 lines
607 B
Markdown
## 1. Fix search result struct
|
|
|
|
- [x] 1.1 Replace nested `Document` struct with flat fields (`Title`, `DocType`, `Tags`) matching engine JSON keys
|
|
- [x] 1.2 Add `ChunkMetadata map[string]interface{}` field to capture `chunk_metadata`
|
|
|
|
## 2. Fix display logic
|
|
|
|
- [x] 2.1 Update title/type/tags references in the display loop to use the new flat fields
|
|
- [x] 2.2 Extract `page` from `ChunkMetadata` map (replacing top-level `Page` field)
|
|
- [x] 2.3 Extract `section_header` from `ChunkMetadata` map (replacing top-level `Section` field)
|
|
|
|
## 3. Verify
|
|
|
|
- [x] 3.1 Build the client and verify it compiles cleanly
|