11/// RAG SourceDocuments table with iFind support - FIXED VERSION
2- /// This class provides the main SourceDocuments table structure that supports iFind functionality
3- /// Key change: Uses %String instead of %Stream.GlobalCharacter to avoid stream field limitations
2+ /// This class provides a table structure compatible with iFind functionality
43Class RAG .SourceDocumentsFixed Extends %Persistent
54{
65
76/// Document identifier
87Property doc _id As %String (MAXLEN = 255 ) [ Required ];
98
109/// Document title
11- Property title As %String (MAXLEN = 1000 );
10+ Property title As %String (MAXLEN = 500 );
1211
13- /// Full text content - Using %Stream for proper IRIS handling
12+ /// Full text content - iFind works on any text field automatically
1413Property text _content As %Stream .GlobalCharacter ;
1514
16- /// Document abstract - Using %String instead of %Stream
17- Property abstract As %String (MAXLEN = 4000 );
18-
1915/// Document authors
2016Property authors As %String (MAXLEN = 1000 );
2117
2218/// Document keywords
2319Property keywords As %String (MAXLEN = 1000 );
2420
25- /// Document metadata as JSON string
26- Property metadata As %String (MAXLEN = 4000 );
27-
28- /// Vector embedding as stream for large embeddings
29- Property embedding As %Stream .GlobalCharacter ;
21+ /// Vector embedding as string
22+ Property embedding As %String (MAXLEN = 60000 );
3023
3124/// Creation timestamp
3225Property created _at As %TimeStamp [ InitialExpression = {$ZDateTime ($Horolog ,3 )} ];
@@ -37,9 +30,6 @@ Index DocIdIndex On doc_id [ Unique ];
3730/// Index on creation timestamp for temporal queries
3831Index CreatedAtIndex On created _at ;
3932
40- /// Index on title for text search
41- Index TitleIndex On title ;
42-
4333/// Storage definition for the class
4434Storage Default
4535{
@@ -57,21 +47,15 @@ Storage Default
5747<Value >text _content </Value >
5848</Value >
5949<Value name =" 5" >
60- <Value >abstract </Value >
61- </Value >
62- <Value name =" 6" >
6350<Value >authors </Value >
6451</Value >
65- <Value name =" 7 " >
52+ <Value name =" 6 " >
6653<Value >keywords </Value >
6754</Value >
68- <Value name =" 8" >
69- <Value >metadata </Value >
70- </Value >
71- <Value name =" 9" >
55+ <Value name =" 7" >
7256<Value >embedding </Value >
7357</Value >
74- <Value name =" 10 " >
58+ <Value name =" 8 " >
7559<Value >created _at </Value >
7660</Value >
7761</Data >
0 commit comments