|
1 | | -/// RAG SourceDocuments table with iFind support - FIXED VERSION |
2 | | -/// This class provides a table structure compatible with iFind functionality |
3 | 1 | Class RAG.SourceDocumentsFixed Extends %Persistent |
4 | 2 | { |
5 | | - |
6 | | -/// Document identifier |
7 | | -Property doc_id As %String(MAXLEN = 255) [ Required ]; |
8 | | - |
9 | | -/// Document title |
10 | | -Property title As %String(MAXLEN = 500); |
11 | | - |
12 | | -/// Full text content - iFind works on any text field automatically |
13 | | -Property text_content As %Stream.GlobalCharacter; |
14 | | - |
15 | | -/// Document authors |
16 | | -Property authors As %String(MAXLEN = 1000); |
17 | | - |
18 | | -/// Document keywords |
19 | | -Property keywords As %String(MAXLEN = 1000); |
20 | | - |
21 | | -/// Vector embedding as string |
22 | | -Property embedding As %String(MAXLEN = 60000); |
23 | | - |
24 | | -/// Creation timestamp |
25 | | -Property created_at As %TimeStamp [ InitialExpression = {$ZDateTime($Horolog,3)} ]; |
26 | | - |
27 | | -/// Index on document ID for fast lookups |
28 | | -Index DocIdIndex On doc_id [ Unique ]; |
29 | | - |
30 | | -/// Index on creation timestamp for temporal queries |
31 | | -Index CreatedAtIndex On created_at; |
32 | | - |
33 | | -/// Storage definition for the class |
34 | | -Storage Default |
35 | | -{ |
36 | | -<Data name="SourceDocumentsFixedDefaultData"> |
37 | | -<Value name="1"> |
38 | | -<Value>%%CLASSNAME</Value> |
39 | | -</Value> |
40 | | -<Value name="2"> |
41 | | -<Value>doc_id</Value> |
42 | | -</Value> |
43 | | -<Value name="3"> |
44 | | -<Value>title</Value> |
45 | | -</Value> |
46 | | -<Value name="4"> |
47 | | -<Value>text_content</Value> |
48 | | -</Value> |
49 | | -<Value name="5"> |
50 | | -<Value>authors</Value> |
51 | | -</Value> |
52 | | -<Value name="6"> |
53 | | -<Value>keywords</Value> |
54 | | -</Value> |
55 | | -<Value name="7"> |
56 | | -<Value>embedding</Value> |
57 | | -</Value> |
58 | | -<Value name="8"> |
59 | | -<Value>created_at</Value> |
60 | | -</Value> |
61 | | -</Data> |
62 | | -<DataLocation>^RAG.SourceDocumentsFixedD</DataLocation> |
63 | | -<DefaultData>SourceDocumentsFixedDefaultData</DefaultData> |
64 | | -<IdLocation>^RAG.SourceDocumentsFixedD</IdLocation> |
65 | | -<IndexLocation>^RAG.SourceDocumentsFixedI</IndexLocation> |
66 | | -<StreamLocation>^RAG.SourceDocumentsFixedS</StreamLocation> |
67 | | -<Type>%Storage.Persistent</Type> |
68 | | -} |
69 | | - |
| 3 | + /// Document identifier |
| 4 | + Property doc_id As %String(MAXLEN=255); |
| 5 | + /// Document title |
| 6 | + Property title As %String(MAXLEN=500); |
| 7 | + /// Full text content - limited to 5000 chars for ObjectScript compilation |
| 8 | + Property text_content As %String(MAXLEN=5000); |
| 9 | + /// Document authors |
| 10 | + Property authors As %String(MAXLEN=1000); |
| 11 | + /// Document keywords |
| 12 | + Property keywords As %String(MAXLEN=1000); |
| 13 | + /// Abstract/summary |
| 14 | + Property abstract As %String(MAXLEN=2000); |
70 | 15 | } |
0 commit comments