Skip to content

Commit a7433f7

Browse files
committed
Merge pull request #54 from claudius108/master
Added links to named index definition.
2 parents f485110 + d40e39f commit a7433f7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

data/lucene.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,14 @@ order by ft:score($sect) descending return $sect</synopsis>
400400
always provide your own analyzer or use one of those supplied by Lucene or
401401
compatible software.</para>
402402
</section>
403-
<section>
403+
<section id="named-indexes">
404404
<title>Defining Fields</title>
405405
<para>Sometimes you may want to define different Lucene indexes on the same set of elements, e.g.
406406
to use a different analyzer. eXist-db allows to name a certain index using the <option>field</option>
407407
attribute:</para>
408408
<synopsis language="xquery"><![CDATA[<text field="title" qname="title" analyzer="en"/>]]></synopsis>
409+
<para>Such an index is called <option>named index</option>. See <ulink url="#query-a-named-index">Query a Named Index</ulink> on how to query the
410+
<option>named indexes</option>.</para>
409411
</section>
410412
</section>
411413
<section>
@@ -434,9 +436,9 @@ return $m</programlisting>
434436
<para>To present search results in a <emphasis>Keywords in Context</emphasis> format,
435437
you may want to have a look at eXist-db's <ulink url="kwic.xml">KWIC</ulink>
436438
module.</para>
437-
<section>
439+
<section id="query-a-named-index">
438440
<title>Query a Named Index</title>
439-
<para>To query a named index, use the <function>ft:query-field($fieldName, $query)</function> instead of
441+
<para>To query a named index (see <ulink url="#named-indexes">Defining Fields</ulink>), use the <function>ft:query-field($fieldName, $query)</function> instead of
440442
<function>ft:query</function>:</para>
441443
<synopsis language="xquery">ft:query-field("title", "xml")</synopsis>
442444
<para>

0 commit comments

Comments
 (0)