Changes

Jump to navigation Jump to search
8 bytes added ,  23:48, 26 May 2012
</options>
</pre>
* [[Map Module|map structure]]: all parameters can be directly represented as key/value pairs:<br />{{Code|<code>map { "key" := "value", ... }}}</code><br/>This variant is more compact, but please note that the W3C’s specification of maps in XQuery is still work in progress.
The following keys are supported:
* {{Code|mode}}: determines the search mode (also called [http://www.w3.org/TR/xpath-full-text-10/#ftwords AnyAllOption]). Allowed values are {{Code|any}}, {{Code|any word}}, {{Code|all}}, {{Code|all words}}, and {{Code|phrase}}. {{Code|any}} is the default search mode.
|
* {{Code|ft:search("DB", "QUERY")}} returns all text nodes of the database {{Code|DB}} that contain the term {{Code|QUERY}}.
* {{Code|<code>ft:search("DB", (2010,2011), map { 'mode':='all' })}}</code><br/>returns all text nodes of the database {{Code|DB}} that contain the numbers {{Code|2010}} and {{Code|20111}}.
* The last example iterates over five databases and returns all elements containing terms similar to {{Code|Hello World}} in the text nodes:
<pre class="brush:xquery">
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu