From 26de2fc942ab5fb1aec6a80cc8f3704601e89a69 Mon Sep 17 00:00:00 2001 From: Cameron Pfiffer Date: Sun, 1 Feb 2026 21:25:59 -0800 Subject: [PATCH] Fix indexer content extraction and lexicon schemas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add 'thought' field to content extraction (was missing for network.comind.thought records) - Inline searchResult schema in lexicons (lexrpc doesn't support $ref) 🤖 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta --- indexer/indexer/embeddings.py | 2 ++ indexer/lexicons/network.comind.search.query.json | 13 ++++++++++++- indexer/lexicons/network.comind.search.similar.json | 13 ++++++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/indexer/indexer/embeddings.py b/indexer/indexer/embeddings.py index 87b54f2..248e193 100644 --- a/indexer/indexer/embeddings.py +++ b/indexer/indexer/embeddings.py @@ -77,6 +77,8 @@ def extract_content(record: dict) -> Optional[str]: parts.append(description) if content := record.get("content"): parts.append(content) + if thought := record.get("thought"): + parts.append(thought) if context := record.get("context"): parts.append(context) if text := record.get("text"): diff --git a/indexer/lexicons/network.comind.search.query.json b/indexer/lexicons/network.comind.search.query.json index 79d9d00..5e2556b 100644 --- a/indexer/lexicons/network.comind.search.query.json +++ b/indexer/lexicons/network.comind.search.query.json @@ -37,7 +37,18 @@ "properties": { "results": { "type": "array", - "items": { "$ref": "#/$defs/searchResult" } + "items": { + "type": "object", + "required": ["uri", "did", "collection", "score"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "did": { "type": "string", "format": "did" }, + "collection": { "type": "string" }, + "content": { "type": "string" }, + "score": { "type": "number" }, + "createdAt": { "type": "string", "format": "datetime" } + } + } } } } diff --git a/indexer/lexicons/network.comind.search.similar.json b/indexer/lexicons/network.comind.search.similar.json index b7d2baa..30bd54f 100644 --- a/indexer/lexicons/network.comind.search.similar.json +++ b/indexer/lexicons/network.comind.search.similar.json @@ -39,7 +39,18 @@ }, "results": { "type": "array", - "items": { "$ref": "network.comind.search.query#searchResult" } + "items": { + "type": "object", + "required": ["uri", "did", "collection", "score"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "did": { "type": "string", "format": "did" }, + "collection": { "type": "string" }, + "content": { "type": "string" }, + "score": { "type": "number" }, + "createdAt": { "type": "string", "format": "datetime" } + } + } } } } -- 2.51.2