forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLuceneObjectDefinition.xml
73 lines (72 loc) · 2.4 KB
/
LuceneObjectDefinition.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="UTF-8"?>
<ObjectDefinition xmlns:xi="http://www.w3.org/2001/XInclude" type="file" indexType="incremental">
<Document type="default">
<xi:include href="../../Services/Object/LuceneDataSource.xml" />
<xi:include href="../../Services/Tagging/LuceneDataSource.xml" />
<xi:include href="../../Services/MetaData/LuceneDataSource.xml" />
<DataSource type="JDBC" action="append">
<Query>
SELECT MAX(version) version, file_name
FROM file_data
WHERE file_id IN (?)
AND rid IS NULL
GROUP BY file_id,file_name
</Query>
<Param format="list" type="int" value="objId" />
<Field store="YES" index="ANALYZED" column="file_name" type="text" name="propertyHigh">
<Transformer name="FilenameExtractor" />
</Field>
<Field store="YES" index="ANALYZED" column="file_name" type="text" name="mimeType">
<Transformer name="MimeTypeExtractor" />
</Field>
<DataSource type="File" action="append">
<PathCreator name="FileObjectPathCreator41" />
<Field store="YES" index="ANALYZED" name="content">
<Transformer name="LinefeedSanitizer" />
</Field>
</DataSource>
</DataSource>
<DataSource type="JDBC" action="append">
<Query>
SELECT
MAX(version) AS version
, file_name
, rid
, il_resource.storage_id
, IF(
STRCMP(il_resource.storage_id, 'fsv2') = 0,
CONCAT(
'fsv2/'
, SUBSTRING(REPLACE(rid, '-', ''), 1, 3)
, '/'
, SUBSTRING(REPLACE(rid, '-', ''), 4, 3)
, '/'
, SUBSTRING(REPLACE(rid, '-', ''), 7, 3)
, '/'
, SUBSTRING(REPLACE(rid, '-', ''), 10)
),
REPLACE(rid, '-', '/')
) AS resource_path
FROM file_data
JOIN il_resource ON il_resource.identification = file_data.rid
WHERE
file_id IN (?) AND
rid IS NOT NULL
GROUP BY file_id,file_name
</Query>
<Param format="list" type="int" value="objId" />
<Field store="YES" index="ANALYZED" column="file_name" type="text" name="propertyHigh">
<Transformer name="FilenameExtractor" />
</Field>
<Field store="YES" index="ANALYZED" column="file_name" type="text" name="mimeType">
<Transformer name="MimeTypeExtractor" />
</Field>
<DataSource type="File" action="append">
<PathCreator name="FileObjectPathCreator7" />
<Field store="YES" index="ANALYZED" name="content">
<Transformer name="LinefeedSanitizer" />
</Field>
</DataSource>
</DataSource>
</Document>
</ObjectDefinition>