Full paths and relative paths in path processing
The XML path can be either a full path or a relative path.
Full paths
Full paths begins with a slash (/). If you use the all_xmltags parameter with xmlpath_processing, all of the full paths are indexed. You can index specific full or relative paths when you use the xmltags parameter.
<text>
<book>
<title>Graph Theory</title>
<author>Stewart</author>
<date>January 14, 2006</date>
</book>
<text>
/text/book/title
/text/book/author
/text/book/date
bts_contains("/text/book/author:stewart")
Relative paths
Relative paths begin with text. You can specify one or more relative or full paths with the xmltags parameter.
text/book/title
text/book/author
text/book/date
book/title
book/author
book/date
title
author
date
The field is created from the first matching path for the values specified with the xmltags parameter.
book/title
and the title
fields: CREATE INDEX books_bts ON books(xml_data bts_lvarchar_ops)
using bts(xmltags="(book/title,title)",xmlpath_processing=”yes”)
IN bts_sbspace;
book/title
. It will
not contain a title
field: book/title:Graph Theory
To view the fields that you have indexed, use the bts_index_fields() function. See bts_index_fields() function.