-
Notifications
You must be signed in to change notification settings - Fork 14
/
volumes.xconf
74 lines (69 loc) · 4.3 KB
/
volumes.xconf
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
74
<collection xmlns="http://exist-db.org/collection-config/1.0">
<index xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:frus="http://history.state.gov/frus/ns/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Lucene index configuration -->
<lucene>
<analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer">
<!-- Specify stop words - or remove them entirely -->
<param name="stopwords" type="org.apache.lucene.analysis.util.CharArraySet">
<!--<value>the</value>-->
</param>
</analyzer>
<!--
<analyzer class="org.apache.lucene.analysis.core.KeywordAnalyzer" id="keyword"/>
-->
<text qname="tei:div">
<!-- required facets and fields -->
<facet dimension="hsg-category" expression="'documents'"/>
<facet dimension="hsg-publication" expression="'frus'"/>
<field name="hsg-fulltext" if="@type = ('section', 'document')"/>
<field name="hsg-url" expression="'/historicaldocuments/' || ancestor::tei:TEI/@xml:id || '/' || ./@xml:id"/>
<!-- end required facets and fields -->
<!-- for searching by date (removes : and - from xs:dateTime) -->
<field name="frus-search-date-min" if="@type = ('section', 'document')" expression="translate(@frus:doc-dateTime-min, ':-', '')" />
<field name="frus-search-date-max" if="@type = ('section', 'document')" expression="translate(@frus:doc-dateTime-max, ':-', '')" />
<!-- for fast sorting by date (binary fields cannot be searched) -->
<field name="hsg-date-min" if="@type = ('section', 'document')" expression="@frus:doc-dateTime-min" binary="true" type="xs:dateTime" />
<field name="hsg-date-max" if="@type = ('section', 'document')" expression="@frus:doc-dateTime-max" binary="true" type="xs:dateTime" />
<!-- additional dimensions for frus -->
<facet dimension="frus-volume-id" expression="ancestor::tei:TEI/@xml:id"/>
<facet dimension="frus-type" expression="@type"/>
<facet dimension="frus-subtype" expression="@subtype"/>
</text>
</lucene>
<!-- Range index configuration -->
<range>
<create match="//tei:note">
<field name="note-type" match="@type" type="xs:string"/>
</create>
<create match="//tei:div">
<field name="div-type" match="@type" type="xs:string"/>
<field name="div-subtype" match="@subtype" type="xs:string"/>
<field name="div-id" match="@xml:id" type="xs:string"/>
<field name="div-date-min" match="@frus:doc-dateTime-min" type="xs:dateTime"/>
<field name="div-date-max" match="@frus:doc-dateTime-max" type="xs:dateTime"/>
</create>
<create qname="@target" type="xs:string"/>
<create qname="@corresp" type="xs:string"/>
<!--create qname="@type" type="xs:string"/-->
<create qname="@xml:id" type="xs:string"/>
<create qname="@id" type="xs:string"/>
<create qname="@rend" type="xs:string"/>
<create qname="@n" type="xs:string"/>
<create qname="@mimeType" type="xs:string"/>
<create qname="@start" type="xs:string"/>
<create qname="tei:idno" type="xs:string"/>
<!-- Note on @xml:id: When using the dedicated fn:id()
function, eXist will use its default xml:id index,
so you don't need an extra index. However, if you use
a general comparison as in //node[@xml:id = 'abc'], then
an additional range index will be required -->
<!--create qname="@when" type="xs:date"/-->
<!-- Note on @when: "eXist can only use a range index
if all values within that index are valid instances
of the defined index type. So every date has to be
an xs:date and if there's just one exception, the
index will no longer be used." Until we've normalized
our dates, there's no point in using this range index. -->
</range>
</index>
</collection>