Re: [basex-talk] Db directory

2018-07-23 Thread Christian Grün
> I see now that I can change the path in the GUI under preferences, but once I > change it I cannot access databases in the "data" folder anymore. Right. In a single BaseX instance, you can only work with a single database directory. > It seems that in db:open I can specify to open a

Re: [basex-talk] Db directory

2018-07-23 Thread Giuseppe Celano
Ok. So as I thought I would like to create different databases for different projects, it seems that the best strategy is to have new (complete) basex folders for each project. BaseX is so light that this does not seem an issue, but still I was not sure this was the way to go. Danke! Giuseppe

Re: [basex-talk] php basex

2018-07-23 Thread Christian Grün
> One thing puzzles me. Why does the same query take different execution time > in GUI and PHP ? > In GUI - 2.5-3sec, in PHP - 8-10sec. There are too many factors that influence execution time (bandwidth, result size, etc.), so you will need to provide us with more information, such as a

Re: [basex-talk] php basex

2018-07-23 Thread Ветошкин Владимир
The query:for $i in (1 to 50)return $i In GUI: 200msIn PHP: 25sec. it is because of the result size, is it?  23.07.2018, 12:24, "Ветошкин Владимир" :Probably, it's because of the result size (~1.5mb).When I reduce the count of the returning data - execution time decreases.The php-code of

Re: [basex-talk] php basex

2018-07-23 Thread Christian Grün
Hi Vladimir, Thanks for the example. This is quite an impressive difference indeed. Two more questions: 1. What is the execution time for running string-join(1 to 50, out:nl()) ? 2. What are the execution times in PHP when running a) execute('xquery ...') b) query('...') and more()/next() ?

Re: [basex-talk] php basex

2018-07-23 Thread Ветошкин Владимир
1. in GUI ~200ms, in PHP ~17sec2a. ~23sec2b. ~17sec >> Maybe there are simple ways to improve the performance of our client [1]?Maybe... I'll try to explore this issue better. 23.07.2018, 12:44, "Christian Grün" :Hi Vladimir,Thanks for the example. This is quite an impressive difference indeed.Two

Re: [basex-talk] Schematron package error

2018-07-23 Thread DK Singh
Hi All, I got the solution actually i was using Saxon9ee so i have changed the Saxon9pe and it worked now schematron running fine. Regards Dharmendra Kumar Singh On Fri, Jul 20, 2018 at 5:07 PM DK Singh wrote: > Hi All, > > I am doing the schematron validation against XML docuemnt but i am

Re: [basex-talk] load invalid xml

2018-07-23 Thread Christian Grün
Hi Vladimir (cc to the list), > That's what I thought. > I can't fix origin xml-files, because they come from external system. > And sometimes they're invalid. > About the file, that I have attached in the previous letter - there is a > duplication of namespace in that file. > Maybe it is

Re: [basex-talk] load invalid xml

2018-07-23 Thread Ветошкин Владимир
>> Could you please tell me more about the external system?It is the customs. Maybe I'll try to fix malformed xml in PHP before importing, if there will be such a task. >> Did you then try to store the documents as raw data, as described in our docs?No. I move such files to the error folder. 

Re: [basex-talk] Curious query optimization

2018-07-23 Thread Sebastian Zimmer
The full-text index of the database is enabled and the compiling info section of the query states - apply full-text index for { $string_0 } using language 'English' The optimized query looks to me as if the index is applied only once via ft:search, but not in both cases. Best, Sebastian

Re: [basex-talk] Full-Text

2018-07-23 Thread Ветошкин Владимир
Hi, Christian! Unfortunately, not :( 22.07.2018, 18:55, "Christian Grün" :This seems to be a limitation of the Russian stemmer implementation, which we took from the Apache Lucene project. Maybe we could replace it with a more sophisticated implementation. Do you have some experience with other

[basex-talk] php basex

2018-07-23 Thread Ветошкин Владимир
Hi! One thing puzzles me. Why does the same query take different execution time in GUI and PHP ?In GUI - 2.5-3sec, in PHP - 8-10sec. -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] php basex

2018-07-23 Thread Ветошкин Владимир
Probably, it's because of the result size (~1.5mb).When I reduce the count of the returning data - execution time decreases.The php-code of measuring execution time:$time_start = microtime(true);while ($query->more()) {$q = $query->next();}$time_end = microtime(true);$execution_time = ($time_end -

Re: [basex-talk] Curious query optimization

2018-07-23 Thread Sebastian Zimmer
Hi Christian, thanks for the fix, the result is correct now. But this query now takes about 18 seconds (!) to execute, instead of <1 second like before. Do you think, this could be accelerated? See attached for the complete console output. Best, Sebastian Am 12.07.2018 um 13:03 schrieb

Re: [basex-talk] Curious query optimization

2018-07-23 Thread Christian Grün
Hi Sebastian, Did you check in the Info View panel if the index is applied? If no, you might try something as follows: if ($fuzzy) then ( collection('ZK')/tei:TEI[... using fuzzy]) ) else ( collection('ZK')/tei:TEI[...]) ) Usually, if full-text options are dynamic, I tend to use

Re: [basex-talk] php basex

2018-07-23 Thread Christian Grün
> 1. in GUI ~200ms, in PHP ~17sec > 2a. ~23sec > 2b. ~17sec I see. So this clearly indicates that it’s the result size (the number of results has an effect as well, but it doesn’t seem to be that dominant). The Java client is much faster indeed. I assume you have communicated with your local

Re: [basex-talk] php basex

2018-07-23 Thread Ветошкин Владимир
>> I assume you have communicated with your local BaseX instance?Yes,$session = new Session("localhost", $this->dbport, $this->dblogin, $this->dbpass); 23.07.2018, 13:19, "Christian Grün" : 1. in GUI ~200ms, in PHP ~17sec 2a. ~23sec 2b. ~17secI see. So this clearly indicates that it’s the result

[basex-talk] Db directory

2018-07-23 Thread Giuseppe Celano
Hi, I would like to create a database in a directory which is not "data" within the Basex folder. I used (within the GUI) the command but it does not work. How can I specify that? Thanks. Ciao, Giuseppe

Re: [basex-talk] Db directory

2018-07-23 Thread Christian Grün
Hi Giuseppe, As DBPATH is a command, no option, you will need to set as detailed in the Options page of our documentation [1]. Please note that DBPATH is a global option. It cannot be assigned at runtime; instead, it must be assigned before BaseX is started Ciao, Christian [1]

Re: [basex-talk] php basex

2018-07-23 Thread Ветошкин Владимир
There is something strange...socket_recv executes much longer than socket_read.. For this:string-join(1 to 10, out:nl())socket_recv takes ~3secsocket_read takes ~1-3ms I don't understand why...  23.07.2018, 13:37, "Ветошкин Владимир" :>> I assume you have communicated with your local BaseX

Re: [basex-talk] Parallelization

2018-07-23 Thread Christian Grün
Hi again, > I am having fun with xquery:fork-join() and I see that it really reduces > evaluation time (!) Ottimo! > My computer has two cores. I was wondering what would happen if a computer > had more cores/CPUs (or if the script were run on a computer cluster): could > the function take

Re: [basex-talk] Db directory

2018-07-23 Thread Giuseppe Celano
Hi, I see now that I can change the path in the GUI under preferences, but once I change it I cannot access databases in the "data" folder anymore. It seems that in db:open I can specify to open a particular file of a database, but I cannot specify the path to a database in a folder different