Re: [basex-talk] Home, DBPATH etc. when basexserver is started in service mode
Hi Subash, d) However if I run basexserver.bat –S (start as service) and then connect via basexclient.bat ,and do a info, the DB_PATH_REPO_PATH etc. are completely confused and basexclient thinks they are in its current directory. sorry for the delay and thanks for the hint; the issue should be fixed in the latest stable snapshot [1]. Best, Christian [1] http://files.basex.org/releases/latest/ ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] timezone formatting
Hi Marco, the new format-...() functions belong to the list of features that need to be finalized for XQuery 3.0. One of the reasons is that their syntax has changed a little over the last months. Just have some patience. Thanks, Christian ___ On Thu, Mar 14, 2013 at 3:57 PM, Marco Lettere marco.lett...@dedalus.eu wrote: Hi again, when, in Basex 7.6, formatting a datetime with format-dateTime(current-dateTime(), [Y0001][M01][D01][h01][m01][s01][Z]) I was expecting something like 20130314035118+0100 for my area (Central Europe) and instead I get 201303140351180060. Looks like minutes are not translated to hours and the sign is missing. For documentation I'm referring to http://www.w3.org/TR/xpath-functions-30/#rules-for-datetime-formatting. Thanks, M. ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] How to update db online without closing application ?
Hi Pratik, as Liam already suggested, the usual way of doing this is to work with two databases and update and optimize the aditional database. Next, you could try to use the UPDINDEX option, which will incrementally update your value index structures [1]. Hope this helps, Christian [1] http://docs.basex.org/wiki/Options#UPDINDEX ___ On Fri, Mar 15, 2013 at 2:29 PM, Liam R E Quin l...@w3.org wrote: On Fri, 2013-03-15 at 11:12 +0530, Pratik Kharwade wrote: [...] While updating, the our application doesnt response till the updates are done. The user can't interact with the application. Some initial thoughts: The update should be done by a separate process or thread than the user interface code. Update one document at a time: load a complete document to a temporary local file before telling BaseX to import it. An alternative is to work with two databases, updating the non-live one and then switching over. Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org freenode/#xml ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] seeking for a document in a collection with a million documents is very slow
Hi Fabrice, yes, the document index is updated with each updating command. If you perform numerous updates, you may get better performance by switching AUTOFLUSH off [1]. Another alternative to speed up multiple update operations is to use XQuery for updates. Due to the pending update list semantics, however, It will require more main memory. Christian [1] http://docs.basex.org/wiki/Options#AUTOFLUSH ___ Dear all, From what I read in the documentation, My problem seems to be related to the update of the resource index. Is this index updated after each add/replace/delete command, Or at the end of the commands’ list ? Last, could you please tell me if replace is equivalent to delete+add ? Best, Fabrice ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] Copy Command
Hi John, I am afraid you’ll have to send us a complete example; otherwise it’s simply too mysterious to guess what’s going on. Christian ___ On Sat, Mar 16, 2013 at 8:06 AM, John Best johnbest5...@gmail.com wrote: Hi there, I am trying to Copy the Doc DB using following piece of code - try{ ... new Copy(Doc, Doc1).execute(CONTEXT); ... ... } catch( .. I am expecting another copy of Doc db as Doc1 db... Am I right..? But can't see Doc1 anywhere... No error mesg... !! -- Have a nice day JBest ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] store results of a query in a new database
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 ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] store results of a query in a new database
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
[basex-talk] some stackrelated questions
Hi, My recursive query gives a stackoverflow: [XQDY0054] Stack Overflow: circular variable declaration? I use the standard, standalone BaseX-software. I'm almost certain it isn't a circular variable declaration because this recursive query can go pretty deep, probably more than a hundred levels and maybe even more. It works on smaller files but it gives this message on the biggest files with the deepest nestinglevel. How deep is the nestinglevel of recursive-queries in BaseX? How can the the max. nestinglevel be increased? Thnx in advance for your reply. Sincerely Rob Stapper ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] seeking for a document in a collection with a million documents is very slow
Thank you Christian. It seems that the resource index is not persistent, But rebuilt in memory at the first index access after the collection is opened. For my 3 M documents collection, it takes about 250 secs to respond to the first db:open('mycoll','mydoc') query. Following queries responds in millisecs before the collection gets opened again. From your experience, What could be the good way to handle a collection of several millions documents, With about ten thousands inserted/updated documents once a week ? Best regards, Fabrice -Message d'origine- De : Christian Grün [mailto:christian.gr...@gmail.com] Envoyé : lundi 18 mars 2013 15:32 À : Fabrice Etanchaud Cc : basex-talk@mailman.uni-konstanz.de Objet : Re: [basex-talk] seeking for a document in a collection with a million documents is very slow Hi Fabrice, yes, the document index is updated with each updating command. If you perform numerous updates, you may get better performance by switching AUTOFLUSH off [1]. Another alternative to speed up multiple update operations is to use XQuery for updates. Due to the pending update list semantics, however, It will require more main memory. Christian [1] http://docs.basex.org/wiki/Options#AUTOFLUSH ___ Dear all, From what I read in the documentation, My problem seems to be related to the update of the resource index. Is this index updated after each add/replace/delete command, Or at the end of the commands' list ? Last, could you please tell me if replace is equivalent to delete+add ? Best, Fabrice ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] store results of a query in a new database
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? Good to know. Edits in our Wiki are always welcome! ;) Thanks, Christian ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] seeking for a document in a collection with a million documents is very slow
Hi Fabrice, From your experience, What could be the good way to handle a collection of several millions documents, With about ten thousands inserted/updated documents once a week ? The article on the Twitter use case may give you some hints how updates can be sped up [1]. Apart from that, I would propose to do some profiling in order to find our which operations require most time or memory. Have you already tried the autoflush option? Do you use XQuery or the commands for your updates? Regarding your last question.. Last, could you please tell me if replace is equivalent to delete+add ? The operations should be quite comparable. If you know the names of all documents to be deleted in advance, you could first delete all commands in a db:delete loop and then add all new documents. [1] http://docs.basex.org/wiki/Twitter -Message d'origine- De : Christian Grün [mailto:christian.gr...@gmail.com] Envoyé : lundi 18 mars 2013 15:32 À : Fabrice Etanchaud Cc : basex-talk@mailman.uni-konstanz.de Objet : Re: [basex-talk] seeking for a document in a collection with a million documents is very slow Hi Fabrice, yes, the document index is updated with each updating command. If you perform numerous updates, you may get better performance by switching AUTOFLUSH off [1]. Another alternative to speed up multiple update operations is to use XQuery for updates. Due to the pending update list semantics, however, It will require more main memory. Christian [1] http://docs.basex.org/wiki/Options#AUTOFLUSH ___ Dear all, From what I read in the documentation, My problem seems to be related to the update of the resource index. Is this index updated after each add/replace/delete command, Or at the end of the commands' list ? Last, could you please tell me if replace is equivalent to delete+add ? Best, Fabrice ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] some stackrelated questions
Hi Rob, the Java stack size can be increased via the -Xss flag of Java [1]. It may be worth to have a look at the latest stable snapshot [2], which contains various XQuery compiler enhancements under the hood. How does your query look like? Christian [1] http://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionX.html#wp999540 [2] http://files.basex.org/releases/latest/ ___ On Mon, Mar 18, 2013 at 4:58 PM, Rob Stapper r.stap...@lijbrandt.nl wrote: Hi, My recursive query gives a stackoverflow: [XQDY0054] Stack Overflow: circular variable declaration? I use the standard, standalone BaseX-software. I’m almost certain it isn’t a circular variable declaration because this recursive query can go pretty deep, probably more than a hundred levels and maybe even more. It works on smaller files but it gives this message on the biggest files with the deepest nestinglevel. How deep is the nestinglevel of recursive-queries in BaseX? How can the the max. nestinglevel be increased? Thnx in advance for your reply. Sincerely Rob Stapper ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] store results of a query in a new database
And my assumption isn't true: The document has to exist, I cannot specify a non-existing document, i.e., a document I maybe would like to produce later as an export of the DB. This sounds surprising to me, as I don’t get any errors when running e.g. the following command.. basex db:create('db', root/, 'doesnotexist.xml') How does your command call look like? Christian ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk