August 2011
Intermediate to advanced
416 pages
10h 14m
English
The simplest XML full-text search is to use ora:contains() in the XMLExists() SQL function. Let’s search the purchase orders from the po_mv view (query_oracontains.sql):
Listing 10-1 Full-Text XML Query Using ora:contains()
select XMLQuery(‘/PurchaseOrder/@id’
passing purchase_order returning content)
from po_mv
where XMLExists(‘/PurchaseOrder/Customer/Name[ora:contains(text(), “liu”)>0]’ passing by value purchase_order);
When executing the query, Oracle XML DB will retrieve all of the data first, perform full-text analysis at run-time, and then deliver matched search results.
Read now
Unlock full access