Field values not indexed for supertags whose Connected To field has dataType=text in schema registry
Version: 2.5.10
Description
Nodes tagged with certain supertags have zero entries in the field_values table, even when those fields contain real node references. This makes tana_related unable to traverse any field-based relationships (e.g. Connected To) for those node types.
Affected supertags (confirmed)
| Supertag | Nodes | Nodes with field_values indexed |
|---|---|---|
#improvement |
10 | 0 |
#issue |
1 | 0 |
#insight |
12 | 0 |
#thread |
32 | 0 |
#action |
1520 | 1469 ✓ |
#initiative |
88 | 85 ✓ |
Root cause hypothesis
The broken supertags have Connected To defined as dataType=text in the schema registry (schema-registry.json). The working supertags have their reference-type fields declared as dataType=reference.
Schema registry comparison:
// BROKEN — improvement
{ "name": "Connected To", "dataType": "text" }
// BROKEN — issue
{ "name": "Connected To", "dataType": "text" }
// WORKING — action (reference field is indexed correctly)
{ "name": "Task Status", "dataType": "reference" }
Hypothesis: the indexer only writes field_values rows for fields with dataType=reference, skipping fields marked as dataType=text even when the actual field value in the export is a node reference (i.e. has a value_node_id).
Steps to reproduce
- In Tana, create an
#improvementnode and set itsConnected Tofield to any thread/initiative - Export and run
supertag sync index - Query:
SELECT COUNT(*) FROM field_values WHERE parent_id = '<improvement-node-id>'; - Result: 0
Impact
tana_related cannot find any connections for #improvement, #issue, #insight, or #thread nodes — these are the primary operational node types used for knowledge management workflows. Calling tana_related on any of these nodes returns "related": [], "count": 0 regardless of how many connections exist in Tana.
Fix suggestion
In the schema registry, Connected To should likely be dataType=reference for all supertags that use it as a node-reference field. Alternatively, the indexer should not use dataType to gate whether field values are written — if value_node_id is populated in the export, it should be indexed as a node reference regardless of the declared dataType.
Related
- Companion to issue #100 (field-value references not indexed as graph edges)
Closing — the root cause analysis was incorrect. The Connected To field is not dataType=text; the schema registry may itself be misreporting field types. Will reopen with corrected analysis once the actual cause is confirmed.