Hi Christian, Am 18.03.2013 um 15:54 schrieb Christian Grün <christian.gr...@gmail.com> :
>> 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. Ah, so I would better use db:create('annotate-$name', <root/>, 'annotate-$name.xml') Somehow it is not clear from the Wiki, I thought I had to use an existing document with some data in it. So this document does not have to exist before? >> 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. Ah, I will try this. >> 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. OK, since some of the DBs will have more than 400 entries, it is save to always optimize the index after updating. Thanks and best regards Cerstin -- Dr. phil. Cerstin Mahlow Universität Basel Departement Sprach- und Literaturwissenschaften Fachbereich Deutsche Sprach- und Literaturwissenschaft Nadelberg 4 4051 Basel Schweiz Tel: +41 61 267 07 65 Fax: +41 61 267 34 40 Mail: cerstin.mah...@unibas.ch Web: http://www.oldphras.net _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk