Changes

Jump to navigation Jump to search
11 bytes removed ,  13:11, 17 January 2016
To enable this kind of searches, ''whitespace chopping'' must be turned off when importing XML documents by setting the option <code>[[Options#CHOP|CHOP]]</code> to <code>OFF</code> (default: <code>SET CHOP ON</code>). In the GUI, you find this option in ''Database'' → ''New…'' → ''Parsing'' → ''Chop Whitespaces''. A query such as <code>//p[. contains text 'real text']</code> will then match the example paragraph above. However, the full-text index will '''not''' be used in this query, so it may take a long time. The full-text index would be used for the query <code>//p[text() contains text 'real text']</code>, but this query will not find the example paragraph, because the matching text is split over two text nodes.
Note that the node structure is completely ignored by the full-text tokenizer: The {{Code|contains text}} expression applies all full-text operations to the ''string value'' of its left operand. As a consequence, the <code>ft:mark</code> and <code>ft:extract</code> functions (see [[Full-Text Module|Full-Text Functions]]) will only yield useful results if they are applied to single text nodes, as the following example demonstrates:
<pre class="brush:xquery">
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu