Summary
This chapter discussed two types of searching strategies on XML documents: the XPath-based search using EXISTSNODE() with ora:contains() and the CTXXPATH index, and the full text search using Oracle Text.Both approaches can be used with other SQL predicates. However, the EXISTSNODE() search provides better datatype comparisons and supports many XML native features such as namespaces, XPath functions, and entities. The EXISTSNODE() search also uses the XML schema to rewrite the XPath-based queries if the XMLType is stored in XML schema–based XMLType objects, which can greatly speed up the search process. CTXSYS.CTXXPATH index and ora:contains() function leverage the full text search functionality within XPath-based queries and enhance the searching capability of EXISTSNODE().Oracle Text, although it supports only limited XML features and XPath syntax, has a powerful text-analysis and linguistic searching capability for an XML document management system. These features include the use of a thesaurus, the use of custom lexes, and the use of word stems and wildcards on indexes.After reading this chapter, you should have a better understanding of Oracle Text and XPath-based queries, which you can use to search XML documents. The next step is to explore XPath functionality and the rich full text search feature in Oracle Text on your own to make your searches more accurate and intelligent.