Hi Dave,
I've noticed that in the ACreate and CreateDB classes, indexes like the full text index are explicitly rebuilt when a new Data instance is created. If one were to directly create a new Data instance using a Builder, would those indexes need to be built after creation and parsing the way they are in the two mentioned classes?
All indexes are optional in BaseX, and mainly applied for speeding up query execution – so you shouldn't encounter any troubles if they are missing. By default, the path summary, text and attribute indexes are created (as Prop.TEXTINDEX, ATTRINDEX and PATHINDEX are set to true). You can create all of them in a second step (e.g. by running an instance of the CreateIndex class).
Secondly, I can't find code that updates the indexes on changes to the database. I would assume that performing updates (either through XQuery Update or directly) such as adding a new element should update the corresponding indexes. Where does this happen? Is it incremental (that is, only those parts of the index that need to be changed are modified) or full (all the indexes are totally rebuilt on every change)?
Your observation is correct – there are no methods for incremental index updates in BaseX. The main reason for dismissing the index structures after updates is that we wanted to keep index structures as small and fast as possible. This means that indexes have to be rebuilt after updates by e.g. triggering the OPTIMIZE command (see also http://basex.org/xquery).
Hope this helps - more questions are welcome, Christian
___________________________
Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen