Hi Cerstin,
So I have the DB 'collect' open and then do: db:create('annotate-abcdef')
as you guessed, you’ll have to specify a document path, in which you can then add new nodes. Every XML document has a root node, and vice versa, so it’s conceptually not possible to only create a root node without a document. Please note, however, that your second argument is simply the name and path of your document, and does not read any input.
How do I set UPDINDEX ON for the new DB?
The following lines should do what you need:
declare option db:ftindex "on"; declare option db:updindex "on"; db:create('annotate', <root/>, 'root.xml')
If you activate the FTINDEX option before creating a database, the OPTIMIZE call will always create/update your full-text index.
To be able to use ft:mark, I would have to optimize the DB with db:optimize() after having added nodes, is this correct?
ft:mark() also works without full-text index, but the index solution is usually faster.
Christian