Changes

Jump to navigation Jump to search
121 bytes removed ,  05:36, 2 May 2012
==ft:search==
{{Mark|Updated with Version 7.2.2:}} {{Mono|$options}} parameter added, second argument generalized, third parameter added.
{|
|-
| valign='top' width='90' | '''Signatures'''
|<code><b>ft:search</b>($db as item(), $terms as item()*) as text()*</code><br/><code><b>ft:search</b>($db as item(), $terms as item()*, $options as item()) as text()*</code>
|-
| valign='top' | '''Summary'''
|Returns all text nodes from the full-text index of the database <code>[[Database Module#Database Argument|$db]]</code> that contain the specified {{Mono|$terms}}.<br/>The options used for building the full-text will also be applied to the search terms. As an example, if the index terms have been stemmed, the search string will be stemmed as well.
The {{Mono|$options}} argument can be used to overwrite the default full-text options. It can be specified as
* {{Mono|element(full-text-options)}}: <code>&lt;full-text-options/&gt;</code> must be used as root element, and the parameters are specified as child nodes, with the element name representing the key and the text node representing the value:<br /><codepre class="brush:xml">&lt;<full-text-options&gt;> <br/key>&nbsp;&nbsp;&lt;key1&gt;value1&lt;/key1&gt;value<br/key>&nbsp;&nbsp; ...<br/>&lt;/full-text-options&gt;></codepre>* [[Map Module|map structure]]: all parameters can be directly represented as key/value pairs:<br /><code>map { "key1key" := "value1value", ... </code>}<br/>This variant is more compact, and it facilitates the binding of arbitrary data types. Note but please note that the map structures are not part W3C’s specification of the maps in XQuery language yet, as the standardization is still work in progress.
The following keys are supported:
* {{Mono|mode}}: determines the search mode (also called [http://www.w3.org/TR/xpath-full-text-10/#ftwords AnyAllOption]). Allowed values are {{Mono|any}}, {{Mono|any word}}, {{Mono|all}}, {{Mono|all words}}, and {{Mono|phrase}}. {{Mono|any}} is the default search mode.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu