Text replacement - "<syntaxhighlight lang="xquery">" to "<pre lang='xquery'>"
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|ft:search|$db as xs:string, $terms as item()*|text()*}}<br/pre>{{Func|ft:search|( $db as xs:string, $terms as item()*, $options as map(*)?| := map { }) as text()*}}</pre>
|- valign="top"
| '''Summary'''
* Return all text nodes of the database {{Code|DB}} that contain the numbers {{Code|2010}} and {{Code|2020}}:<br/><code>ft:search("DB", ("2010", "2020"), map { 'mode': 'all' })</code>
* Return text nodes that contain the terms {{Code|A}} and {{Code|B|}} in a distance of at most 5 words:
<syntaxhighlight pre lang="'xquery"'>
ft:search("db", ("A", "B"), map {
"mode": "all words",
}
})
</syntaxhighlightpre>
* Iterate over three databases and return all elements containing terms similar to {{Code|Hello World}} in the text nodes:
| width='120' | '''SignaturesSignature'''|{{Func|ft:tokens|$db as xs:string|element(value)*}}<br/pre>{{Func|ft:tokens|( $db as xs:string, $prefix as xs:string| := ()) as element(value)*}}</pre>
|- valign="top"
| '''Summary'''
| '''Examples'''
|Returns the number of occurrences for a single, specific index entry:
| width='120' | '''SignaturesSignature'''|{{Func|ft:contains|$input as item()*, $terms as item()*|xs:boolean}}<br/pre>{{Func|ft:contains|( $input as item()*, $terms as item()*, $options as map(*)?| := map { }) as xs:boolean}}</pre>
|- valign="top"
| '''Summary'''
|
* Checks if {{Code|jack}} or {{Code|john}} occurs in the input string {{Code|John Doe}}:
| width='120' | '''SignaturesSignature'''|{{Func|<pre>ft:count|( $nodes as node()*|) as xs:integer}}</pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|<pre>ft:score|( $item as item()*|) as xs:double*}}</pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|ft:tokenize|$string as xs:string?|xs:string*}}<br/pre>{{Func|ft:tokenize|( $string as xs:string?, $options as map(*)?| := map { }) as xs:string*}}</pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|ft:normalize|$string as xs:string?|xs:string}}<br/pre>{{Func|ft:normalize|( $string as xs:string?, $options as map(*)?| := map { }) as xs:string}}</pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|ft:thesaurus|$node as node(), $term as xs:string|xs:string*}}<br/pre>{{Func|ft:thesaurus|( $node as node(), $term as xs:string, $options as map(*)?| := map { }) as xs:string*}}<br/pre>
|- valign="top"
| '''Summary'''
| '''Examples'''
| Returns {{Code|happy}} and {{Code|lucky}}:
<syntaxhighlight pre lang="'xquery"'>
ft:thesaurus(
<thesaurus>
'happy'
)
</syntaxhighlightpre>
|}
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|ft:mark|$nodes as node()*|node()*}}<br/pre>{{Func|ft:mark|( $nodes as node()*, $name as xs:string| := ()) as node()*}}</pre>
|- valign="top"
| '''Summary'''
| '''Examples'''
|'''Example 1''': The following query returns {{Code|<XML><mark>hello</mark> world</XML>}}, if one text node of the database {{Code|DB}} has the value "hello world":
<syntaxhighlight pre lang="'xquery"'>
ft:mark(db:get('DB')//*[text() contains text 'hello'])
</syntaxhighlightpre>
'''Example 2''': The following expression loops through the first ten full-text results and marks the results in a second expression:
<syntaxhighlight pre lang="'xquery"'>
let $start := 1
let $end := 10
for $ft in (db:get('DB')//*[$test(.)])[position() = $start to $end]
return ft:mark($ft[$test(.)])
</syntaxhighlightpre>
'''Example 3''': The following expression returns <code><xml>hello <b>word</b></xml></code>:
<syntaxhighlight pre lang="'xquery"'>
copy $p := <xml>hello world</xml>
modify ()
return ft:mark($p[text() contains text 'word'], 'b')
</syntaxhighlightpre>
|}
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|ft:extract|$nodes as node()*|node()*}}<br/pre>{{Func|ft:extract|( $nodes as node()*, $name as xs:string|node()*}}<br/>{{Func|ft :extract|$nodes as node= ()*, $name as xs:string, $length as xs:integer| := ()) as node()*}}</pre>
|- valign="top"
| '''Summary'''
|
* The following query may return {{Code|<XML>...<b>hello</b>...<XML>}} if a text node of the database {{Code|DB}} contains the string "hello world":
<syntaxhighlight pre lang="'xquery"'>
ft:extract(db:get('DB')//*[text() contains text 'hello'], 'b', 1)