text_contains — Returns true if the text value of some node in the given node-set contains the text matching the given free-text query, otherwise returns false.
||scope node-set ,|
This function calculates text values of nodes from the
scope , and checks whether
the current text value contains any fragment that matches the
query . When the first
match is found, the rest of the node-set is ignored the boolean
'true' is returned. If the node-set ends before any match is found,
'false' is returned.
text_contains() function may
be used only in XPath expressions that are arguments of
xcontains() . This restriction is for
optimization purposes. When Virtuoso executes an SQL statement that
xcontains() , it performs some
sophisticated free-text search, and it applies the XPath expression
not to all available documents but only to documents that satisfied
the free-text search criterion. Moreover, the server uses the
intermediate free-text data to optimize the search inside a
The node-set where the text search is performed.
The text of the query.
Returns a boolean: True or False.
When the first match is found, the rest of the node-set is ignored the boolean 'true' is returned. If the node-set ends before any match is found, 'false' is returned.
Table24.152.Errors signalled by text-contains()
|SQLState||Error Code||Error Text||Description|
|XP370||XPF11||XPATH function text-contains() is allowed only in special SQL predicate xcontains()||The XPath processor is called not by xcontains() but by some other way so it has no suitable free-text data.|
|XP001||XPF13||Unsupported combination of arguments in XPATH function text-contains()||The XPath processor has failed to built an execution plan for the free-text search.|