Handling Doctype Evolution
As time goes on, the DTD of your document collection may change, going through several versions as it evolves. A heterogeneous collection faces that challenge, as well as the challenge of new, unanticipated doctypes entering the system. How can interMedia cope with these changes?
The autosectioner indexes every XML tag, so as soon as a new XML tag appears in your collection, you can use it in WITHIN searches. The only trouble spot to watch out for is tag collision.
The XML sectioner has a harder time handling new tags. With the XML sectioner, the user must define which tags to keep before creating the index. Every undefined tag is thrown away. As new tags appear in the document collection, they are simply thrown away as well.
When this happens, the index owner must modify the index to add the
new tags to the index’s list of tags to keep. This is done
using an ALTER INDEX command. If our <DamageReport> fragments
start to include a <Lawsuit> tag, for instance, the following
command:
ALTER INDEX damagereportx REBUILD
PARAMETERS ('add zone section lawsuit tag Lawsuit')will modify the index metadata and add the tag <Lawsuit> as the
section lawsuit. Don’t be scared by the
ALTER INDEX . . . REBUILD syntax—the index is not really going
to be dropped and recreated. This is a quick metadata change only. In
fact, because the index is not dropped and recreated, this will not
affect documents already in the system, although documents added
after this call with the <Lawsuit> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access