Changes

Jump to navigation Jump to search
111 bytes removed ,  13:27, 17 January 2016
no edit summary
* {{Code|phrase}}: all strings need to be found as a single phrase
The keywords {{Code|ftand}}, {{Code|ftor}} and {{Code|ftnot}} can also be used to combine multiple query terms. The following query yields the same result as the last one does (but it takes [[#FTAnd|more memory]]):
<pre class="brush:xquery">
for $text in ("New York", "new conditions")
return $text contains text "New" not in "New York"
</pre>
 
Due to the complex data model of the XQuery Full Text spec, the usage of {{Code|ftand}} may lead to a high memory consumption. If you should encounter problems, simply use the {{Code|all}} keyword:
 
<pre class="brush:xquery">
doc('factbook')//country[descendant::religions contains text { 'Christian', 'Jewish'} all]/name
</pre>
<xquery> /text[. contains text { 'houses' } using no stemming] </xquery>
</commands>
</pre>
 
==FTAnd==
 
The internal XQuery Full Text data model may consume a lot of main memory. This is particularly true for {{Code|ftand}}, so better avoid it when possible, and use the alternative syntax with the {{Code|all}} keyword:
 
<pre class="brush:xquery">
(: representation via "ftand" :)
"A B" contains text "A" ftand "B"
(: memory-saving representation :)
"A B" contains text { "A", "B" } all
</pre>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu