1
1
/// 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
4
3
Class RAG .SourceDocumentsFixed Extends %Persistent
5
4
{
6
5
7
6
/// Document identifier
8
7
Property doc _id As %String (MAXLEN = 255 ) [ Required ];
9
8
10
9
/// Document title
11
- Property title As %String (MAXLEN = 1000 );
10
+ Property title As %String (MAXLEN = 500 );
12
11
13
- /// Full text content - Using %Stream for proper IRIS handling
12
+ /// Full text content - iFind works on any text field automatically
14
13
Property text _content As %Stream .GlobalCharacter ;
15
14
16
- /// Document abstract - Using %String instead of %Stream
17
- Property abstract As %String (MAXLEN = 4000 );
18
-
19
15
/// Document authors
20
16
Property authors As %String (MAXLEN = 1000 );
21
17
22
18
/// Document keywords
23
19
Property keywords As %String (MAXLEN = 1000 );
24
20
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 );
30
23
31
24
/// Creation timestamp
32
25
Property created _at As %TimeStamp [ InitialExpression = {$ZDateTime ($Horolog ,3 )} ];
@@ -37,9 +30,6 @@ Index DocIdIndex On doc_id [ Unique ];
37
30
/// Index on creation timestamp for temporal queries
38
31
Index CreatedAtIndex On created _at ;
39
32
40
- /// Index on title for text search
41
- Index TitleIndex On title ;
42
-
43
33
/// Storage definition for the class
44
34
Storage Default
45
35
{
@@ -57,21 +47,15 @@ Storage Default
57
47
<Value >text _content </Value >
58
48
</Value >
59
49
<Value name =" 5" >
60
- <Value >abstract </Value >
61
- </Value >
62
- <Value name =" 6" >
63
50
<Value >authors </Value >
64
51
</Value >
65
- <Value name =" 7 " >
52
+ <Value name =" 6 " >
66
53
<Value >keywords </Value >
67
54
</Value >
68
- <Value name =" 8" >
69
- <Value >metadata </Value >
70
- </Value >
71
- <Value name =" 9" >
55
+ <Value name =" 7" >
72
56
<Value >embedding </Value >
73
57
</Value >
74
- <Value name =" 10 " >
58
+ <Value name =" 8 " >
75
59
<Value >created _at </Value >
76
60
</Value >
77
61
</Data >
0 commit comments