Automatic Indexes

By default, BDB XML will automatically maintain the following indexes for your containers:

        node-element-string-equality
        node-attribute-string-equality
        node-element-double-equality
        node-attribute-double-equality 

These automatic indexes will index all leaf nodes and all attributes. Maintaining them does represent a bit of a performance hit for your containers since BDB XML must determine if a document node is a leaf node, and then index it if it is. If a new leaf node is discovered when a document is added to your container (that is, BDB XML has never seen it before), then BDB XML will create the appropriate index for every document in your container.

For this reason, autoindexing is best used for containers that do not contain a mix of document types, and for containers that are not extremely large in size. If your containers do contain a wide variety of document types (and so new leaf nodes will be discovered frequently when adding documents), or your containers are simply extremely large, you should probably turn this feature off.

You turn automatic indexing off by specifying false to the XmlIndexSpecification.setAutoIndexing() method. Turn automatic indexing back on by specifying true to the same method.