Skip to content

Commit 9ad4e2e

Browse files
committed
Correct sample index config, xmlns placement info
Fixing the index config and discussion thereof reminded me of a discussion on exist-open https://markmail.org/message/jjzubo2tpe3augg6, which prompted Wolfgang to relax the restriction that had been documented here. See his commit at eXist-db/exist@49268ef.
1 parent 513638b commit 9ad4e2e

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/main/xar-resources/data/indexing/indexing.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
schematypens="http://purl.oclc.org/dsdl/schematron"?><article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
44
<info>
55
<title>Configuring Database Indexes</title>
6-
<date>2Q19</date>
6+
<date>2Q21</date>
77
<keywordset>
88
<keyword>application-development</keyword>
99
</keywordset>
@@ -174,16 +174,14 @@
174174
types of indexes: full text, range and ngram.</para>
175175

176176
<para>If the document to be indexed uses namespaces, you should add a
177-
<literal>xmlns</literal> declaration for each of the required namespaces to the
178-
<tag>index</tag> element:</para>
177+
<literal>xmlns</literal> declaration for each of the required namespaces:</para>
179178

180179
<programlisting language="xml" xlink:href="listings/listing-4.xml"/>
181180
<para>The example configuration above creates two indexes on a collection of atom
182181
documents. The two elements which should be indexed are both in the
183182
<literal>atom</literal> namespace and we therefore need to declare a mapping for
184-
this namespace. Please note that the <literal>xmlns</literal> namespace declarations
185-
have to be specified on the <tag>index</tag> element, not the <tag>create</tag> or
186-
<tag>fulltext</tag> elements.</para>
183+
this namespace. Here, the namespace mapping is placed on the <tag>index</tag>
184+
element, but it can appear anywhere in the configuration document.</para>
187185
</sect2>
188186
</sect1>
189187

src/main/xar-resources/data/indexing/listings/listing-4.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<collection xmlns="http://exist-db.org/collection-config/1.0">
22
<index xmlns:atom="http://www.w3.org/2005/Atom">
33
<lucene>
4-
<create qname="atom:title"/>
4+
<text qname="atom:title"/>
55
</lucene>
66
<range>
77
<create qname="atom:id" type="xs:string"/>

0 commit comments

Comments
 (0)