An XML Search Index is an XML-enabled Oracle Text index (CTXSYS.CONTEXT). This index type supports IR-style searching and structured searching in one unified index. XML Search Index also stores a Binary PDOM internally within an Oracle Text table, so that XML operations can be functionally evaluated over the Binary PDOM. This XML Search Index is supported for XMLTYPE data stores. XMLEXISTS is seamlessly rewritten to a CONTAINS in the presence of such an XML Search Index.
When an XML Search Index is created, a Binary PDOM of the XML document is materialized in an internal table of Oracle Text. Post evaluation from the Text index will be redirected to go against the PDOM stored in this internal table.
Oracle Text Reference for information on xml_enable
variable of SET_SEC_GRP_ATTR
to enable XML awareness for XML Search Index
The following example creates an Oracle XML Search Index:
exec CTX_DDL.CREATE_SECTION_GROUP('secgroup','PATH_SECTION_GROUP'); exec CTX_DDL.SET_SEC_GRP_ATTR('secgroup','xml_enable','t'); CREATE INDEX po_ctx_idx on T(X) indextype is ctxsys.context parameters (‘section group SECGROUP');