Example: Index subtags in XML data
You can use the include_subtag_text parameter to include the text within formatting tags in the indexed data.
Given
the XML fragment:
<comment>
this
<bold> highlighted </bold>
text is very
<italic>
<bold>important</bold>
</italic>
to me
</comment>
If you create a bts index with
the include_subtag_text parameter disabled:
CREATE INDEX comments_bts ON mylog(comment_data bts_lvarchar_ops)
USING bts(xmltags="(comment)",include_subtag_text="no") IN bts_sbspace;
The
index will have three separate
comment
fields: comment:this
comment:text is very
comment:to me
If you create a bts index with
the include_subtag_text parameter enabled:
CREATE INDEX comments_bts ON mylog(comment_data bts_lvarchar_ops)
USING bts(xmltags="(comment)",include_subtag_text="yes") IN bts_sbspace;
All
of the text is indexed in a single
comment
field: comment:this highlighted text is very important to me