|
519 | 519 | <para>Sometimes you may want to define different Lucene indexes on the same set of elements, e.g. |
520 | 520 | to use a different analyzer. eXist-db allows to name a certain index using the <option>field</option> |
521 | 521 | attribute:</para> |
522 | | - <synopsis language="xquery"><![CDATA[<text field="title" qname="title" analyzer="en"/>]]></synopsis> |
523 | | - <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 |
524 | | - <option>named indexes</option>.</para> |
| 522 | + <synopsis language="xquery"><text field="title" qname="title" analyzer="en"/></synopsis> |
| 523 | + <para>Such an index is called <option>named index</option>. See <xref linkend="query-a-named-index"/> on how to query the |
| 524 | + <option>named indexes</option>.</para> |
525 | 525 | </section> |
526 | 526 | </section> |
527 | 527 | <section> |
@@ -552,7 +552,7 @@ return $m</programlisting> |
552 | 552 | module.</para> |
553 | 553 | <section id="query-a-named-index"> |
554 | 554 | <title>Query a Named Index</title> |
555 | | - <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 |
| 555 | + <para>To query a named index (see <xref linkend="named-indexes"/>), use the <function>ft:query-field($fieldName, $query)</function> instead of |
556 | 556 | <function>ft:query</function>:</para> |
557 | 557 | <synopsis language="xquery">ft:query-field("title", "xml")</synopsis> |
558 | 558 | <para> |
@@ -818,11 +818,11 @@ return |
818 | 818 | a document, containing information which does not exist in the XML as such.</para> |
819 | 819 | <para>The field indexes are not configured via <filename>collection.xconf</filename>. Instead we add |
820 | 820 | fields programmatically from an XQuery (which could be run via a trigger):</para> |
821 | | - <programlisting language="xquery"><![CDATA[ft:index("/db/demo/test.xml", <doc> |
822 | | - <field name="title" store="yes">Indexing</field> |
823 | | - <field name="author" store="yes">Me</field> |
824 | | - <field name="date" store="yes">2013</field> |
825 | | -</doc>)]]></programlisting> |
| 821 | + <programlisting language="xquery">ft:index("/db/demo/test.xml", <doc> |
| 822 | + <field name="title" store="yes">Indexing</field> |
| 823 | + <field name="author" store="yes">Me</field> |
| 824 | + <field name="date" store="yes">2013</field> |
| 825 | +</doc>)</programlisting> |
826 | 826 | <para>The <option>store</option> attribute indicates that the fields content should be stored as a string. |
827 | 827 | Without this attribute, the content will be indexed for search, but you won't be able to retrieve the contents. |
828 | 828 | </para> |
|
0 commit comments