[basex-talk] basex trouble

2018-05-23 Thread Ветошкин Владимир
 Hello!

 Sorry for my English.
 May I ask you some questions here or I have to write them on github?

 --
 С уважением,
  Ветошкин Владимир Владимирович


Re: [basex-talk] basex trouble

2018-05-24 Thread Ветошкин Владимир
Hi, Christian!
Thank you for your reply!

I attached the file.

I thought about "random access patterns"
But all databases are on one disk.
So, why two queries to different databases complete in about 5 sec?
And if these queries make to one database - it takes a long time...

> by setting the PARALLEL option to 1
It helped a bit. Now the second script is waiting for finishing the first.
But I would like to see a parallel execution of these queries. Is it possible 
without long waiting?
May be it is possible to load database (or some nodes) in memory to avoid heavy 
load the disk?


23.05.2018, 22:54, "Christian Grün" :
> Hi Ветошкин (cc to the list),
>
> Maybe we find a way to speed up your queries; you can attach them to
> your next mail.
>
> I guess that the parallel query execution leads to "random access
> patterns" on disk. You can enforce one query at a time by setting the
> PARALLEL option to 1 (see [1]).
>
> Hope this helps,
> Christian
>
> [1] http://docs.basex.org/wiki/Options#PARALLEL
>
> On Wed, May 23, 2018 at 9:40 PM, Ветошкин Владимир  
> wrote:
>>  Hi, Christian!
>>
>>  Thank you.
>>
>>  I have two scripts, which make queries to one database.
>>  If I run these queries at different times, each of them completes in about 5
>>  sec.
>>  But if I run both scripts at one time, it takes about 40 sec.
>>
>>  If the scripts make queries to different databases - it's ok, it takes about
>>  5 sec.
>>
>>  Is it possible to improve this situation?
>>
>>  I tried to use this code to load database in main-memory:
>>  db:open('db1') update {}
>>  But it didn't help.
>>
>>  I hope, you understand me :)
>>
>>  23.05.2018, 20:15, "Christian Grün" :
>>
>>  Привет Ветошкин,
>>
>>  Welcome to the list. Just send your question to this address.
>>
>>  Best,
>>  Christian
>>
>>  Ветошкин Владимир  schrieb am Mi., 23. Mai 2018, 19:10:
>>
>>   Hello!
>>
>>   Sorry for my English.
>>   May I ask you some questions here or I have to write them on github?
>>
>>   --
>>   С уважением,
>>    Ветошкин Владимир Владимирович
>>
>>  --
>>  С уважением,
>>  Ветошкин Владимир Владимирович

-- 
С уважением,
 Ветошкин Владимир Владимирович


report3.xq
Description: Binary data


Re: [basex-talk] basex trouble

2018-05-24 Thread Ветошкин Владимир
Christian, 

Is it possible to add index only for "EnvelopeID" since only this field is in 
where clause?
May be it will speed up the queries..

24.05.2018, 14:47, "Ветошкин Владимир" :
> Thank you Christian for your kind words :)
>
> I rewrote queries as you said.
> It helped and now query completes in about 3 seconds. Anyway, it's better.
>
> Also I added text index for this base.
> And there are 2 records about index in the "Info View" panel:
> - apply text index for $envs_49
> - rewrite where clause(s)
> - simplify gflwor
> - pre-evaluate db:open("000999") to document-node() sequence
> - apply text index for $invenvs_51
> - rewrite where clause(s)
> - simplify gflwor
>
> I attached the file, which contains the full text from the panel.
>
> 24.05.2018, 13:12, "Christian Grün" :
>>>   I thought about "random access patterns"
>>>   But all databases are on one disk.
>>
>>  I agree, this sounds confusing at first sight. Some more details: If
>>  the same database is opened by multiple queries, only one instance
>>  will be opened. The same data cursor is used to read data, and if the
>>  data is accessed in parallel, this cursor will repeatedly moved,
>>  leading to adverse access patterns. This may be not so bad if
>>  different databases are accessed (in this case, we’ll have multiple
>>  cursors). But it’s also possible to write queries that show the
>>  opposite effect (slow parallel access on multiple databases, fast
>>  parallel access on single databases), so it also depends on the
>>  specific queries (if sequential scans are performed, if index access
>>  is possible, etc.) and your data sets.
>>
>>  In general, you benefit a lot if your queries take advantage of the
>>  available index structures (see [1] for more information). You can
>>  open the "Info View" panel in BaseX and look for hints to index
>>  rewritings. In your specific query, I noticed that $qxml and $qxmldoc
>>  point to the same node. Moreover, you it helps to use "where" clauses
>>  as early as possible, so the first part of your query could possibly
>>  be rewritten to...
>>
>>    for $qxml in db:open('000999')
>>    where $qxml/*:Envelope/*:Header/*:RoutingInf/*:EnvelopeID/text() = $envs
>>    let $qdoc := ...
>>    return $qxml
>>
>>  Hope this helps,
>>  Christian
>>
>>  PS: As far as I can judge, your English is fine ;)
>>
>>  [1] http://docs.basex.org/wiki/Indexes
>>
>>>   So, why two queries to different databases complete in about 5 sec?
>>>   And if these queries make to one database - it takes a long time...
>>>
>>>>   by setting the PARALLEL option to 1
>>>   It helped a bit. Now the second script is waiting for finishing the first.
>>>   But I would like to see a parallel execution of these queries. Is it 
>>> possible without long waiting?
>>>   May be it is possible to load database (or some nodes) in memory to avoid 
>>> heavy load the disk?
>>>
>>>   23.05.2018, 22:54, "Christian Grün" :
>>>>   Hi Ветошкин (cc to the list),
>>>>
>>>>   Maybe we find a way to speed up your queries; you can attach them to
>>>>   your next mail.
>>>>
>>>>   I guess that the parallel query execution leads to "random access
>>>>   patterns" on disk. You can enforce one query at a time by setting the
>>>>   PARALLEL option to 1 (see [1]).
>>>>
>>>>   Hope this helps,
>>>>   Christian
>>>>
>>>>   [1] http://docs.basex.org/wiki/Options#PARALLEL
>>>>
>>>>   On Wed, May 23, 2018 at 9:40 PM, Ветошкин Владимир  
>>>> wrote:
>>>>>    Hi, Christian!
>>>>>
>>>>>    Thank you.
>>>>>
>>>>>    I have two scripts, which make queries to one database.
>>>>>    If I run these queries at different times, each of them completes in 
>>>>> about 5
>>>>>    sec.
>>>>>    But if I run both scripts at one time, it takes about 40 sec.
>>>>>
>>>>>    If the scripts make queries to different databases - it's ok, it takes 
>>>>> about
>>>>>    5 sec.
>>>>>
>>>>>    Is it possible to improve this situation?
>>>>>
>>>>>    I tried to use this code to load database in main-memory:
>>>>>    db:open('db1') update {}
>>>>>    But it didn't help.
>>>>>
>>>>>    I hope, you understand me :)
>>>>>
>>>>>    23.05.2018, 20:15, "Christian Grün" :
>>>>>
>>>>>    Привет Ветошкин,
>>>>>
>>>>>    Welcome to the list. Just send your question to this address.
>>>>>
>>>>>    Best,
>>>>>    Christian
>>>>>
>>>>>    Ветошкин Владимир  schrieb am Mi., 23. Mai 2018, 
>>>>> 19:10:
>>>>>
>>>>> Hello!
>>>>>
>>>>> Sorry for my English.
>>>>> May I ask you some questions here or I have to write them on github?
>>>>>
>>>>> --
>>>>> С уважением,
>>>>>  Ветошкин Владимир Владимирович
>>>>>
>>>>>    --
>>>>>    С уважением,
>>>>>    Ветошкин Владимир Владимирович
>>>
>>>   --
>>>   С уважением,
>>>    Ветошкин Владимир Владимирович
>
> --
> С уважением,
>  Ветошкин Владимир Владимирович

-- 
С уважением,
 Ветошкин Владимир Владимирович



[basex-talk] progress of query execution

2018-05-27 Thread Ветошкин Владимир
Hi, everybody!

My core has written in php and php-script execute xquery-scripts to get needed 
data.
To get the progress of one large query I have to divide it into some small 
ones. Isn't it?
Are there any more options?
Maybe it is possible to get number of seconds, which needed to complete 
execution of query?


-- 
С уважением,
 Ветошкин Владимир Владимирович



[basex-talk] Full-Text

2018-06-21 Thread Ветошкин Владимир
Hi, everyone! Is there any way to index only imported xml-files?Now, when I import xml-files the full-text index is deleted.After importing I recreate whole full-text index and it takes too much time :( -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] Full-Text

2018-06-25 Thread Ветошкин Владимир
Hi, Fabrice!Thank you. All databases constantly change.That is why there is no way to single out "a big readonly collection" :(Maybe it is possible to use some other incremental indexes?I have to index specific xml-files, not all files in database. 21.06.2018, 17:16, "Fabrice ETANCHAUD" :Hi Vladimir, I don’t think there is something like a incremental full text index for the moment [1].As index is per collection, the recommanded way shall be to split your data in two collections :-  A big readonly collection of all the past updates, indexed once-  A small/medium sized collection whom full text index can be recreated in an acceptable time after each update.At the end of a predefined time period, you have to add the live collection to the readonly one, reindex it, and truncate the live one. Best regards from France,Fabrice Etanchaud [1] http://docs.basex.org/wiki/Indexes#UpdatesDe : BaseX-Talk [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de  Envoyé : jeudi 21 juin 2018 16:02À : BaseXObjet : [basex-talk] Full-Text Hi, everyone! Is there any way to index only imported xml-files?Now, when I import xml-files the full-text index is deleted.After importing I recreate whole full-text index and it takes too much time :( -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] Full-Text

2018-06-25 Thread Ветошкин Владимир
Hi, Fabrice, I have several databases.Each time I fill them with some xml-files. Some of these files contain container (esadout tag) with needed data. I have to index the actual (last) container.Each base contains many documents (with its own ID) and I have to index actual container of each document. I would not like to split files in several collections. If it is possible to find substring of node value without fulltext - I will be glad to hear it :)  25.06.2018, 11:10, "Fabrice ETANCHAUD" :Hi Vladimir, So what about storing those specific files in an ad-hoc collection, and only index that one ?Is there a partition pattern you could use to split these specific files in several collections of medium size ? If you do not need fulltext capabilities, you can use incremental text() or attribute indices.Do you need to index only a specific set of text() or attributes ? If so, you can also specify a list of element or attribute names to be indexed, and by the way reduce the time needed to reindex. Best regards,Fabrice De : Ветошкин Владимир [mailto:en-tra...@yandex.ru]Envoyé : lundi 25 juin 2018 09:42À : Fabrice ETANCHAUD; BaseXObjet : Re: [basex-talk] Full-Text Hi, Fabrice!Thank you. All databases constantly change.That is why there is no way to single out "a big readonly collection" :(Maybe it is possible to use some other incremental indexes?I have to index specific xml-files, not all files in database. 21.06.2018, 17:16, "Fabrice ETANCHAUD" <fetanch...@pch.cerfrance.fr>:Hi Vladimir, I don’t think there is something like a incremental full text index for the moment [1].As index is per collection, the recommanded way shall be to split your data in two collections :-  A big readonly collection of all the past updates, indexed once-  A small/medium sized collection whom full text index can be recreated in an acceptable time after each update.At the end of a predefined time period, you have to add the live collection to the readonly one, reindex it, and truncate the live one. Best regards from France,Fabrice Etanchaud [1] http://docs.basex.org/wiki/Indexes#UpdatesDe : BaseX-Talk [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de  Envoyé : jeudi 21 juin 2018 16:02À : BaseXObjet : [basex-talk] Full-Text Hi, everyone! Is there any way to index only imported xml-files?Now, when I import xml-files the full-text index is deleted.After importing I recreate whole full-text index and it takes too much time :( -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] Full-Text

2018-06-25 Thread Ветошкин Владимир
Hi, Alexander!Thank you! In my previous letter I have described the proccess in short.I'll think about separated DB. But I'm afraid that this base will also be very big in future.Although I can try to split data to several databases - one per year.. Hmm.. 25.06.2018, 11:25, "Alexander Shpack" :Hey, Vladimir! Just put this specific files to the separated DB and than index it. You can process it automatically, BaseX allows to create and index DB right from XQuery. I hope it helps you. Anyhow, you can provide more details about your task and we can figure out the best solution for you.   On Mon, Jun 25, 2018 at 10:42 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi, Fabrice!Thank you. All databases constantly change.That is why there is no way to single out "a big readonly collection" :(Maybe it is possible to use some other incremental indexes?I have to index specific xml-files, not all files in database. 21.06.2018, 17:16, "Fabrice ETANCHAUD" <fetanch...@pch.cerfrance.fr>:Hi Vladimir, I don’t think there is something like a incremental full text index for the moment [1].As index is per collection, the recommanded way shall be to split your data in two collections :-  A big readonly collection of all the past updates, indexed once-  A small/medium sized collection whom full text index can be recreated in an acceptable time after each update.At the end of a predefined time period, you have to add the live collection to the readonly one, reindex it, and truncate the live one. Best regards from France,Fabrice Etanchaud [1] http://docs.basex.org/wiki/Indexes#UpdatesDe : BaseX-Talk [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de  Envoyé : jeudi 21 juin 2018 16:02À : BaseXObjet : [basex-talk] Full-Text Hi, everyone! Is there any way to index only imported xml-files?Now, when I import xml-files the full-text index is deleted.After importing I recreate whole full-text index and it takes too much time :( -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович --s0rr0w  -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] Full-Text

2018-06-25 Thread Ветошкин Владимир
Hi, Alexander, Some questions:After that, how can I perform a search in all of these databases?Can I search for substring without fulltext using only text index? 25.06.2018, 11:56, "Alexander Shpack" :Hey Vladimir, You can use sharding approach for you data import and split all DBs even every month.  On Mon, Jun 25, 2018 at 11:50 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi, Alexander!Thank you! In my previous letter I have described the proccess in short.I'll think about separated DB. But I'm afraid that this base will also be very big in future.Although I can try to split data to several databases - one per year.. Hmm.. 25.06.2018, 11:25, "Alexander Shpack" <shadow...@gmail.com>:Hey, Vladimir! Just put this specific files to the separated DB and than index it. You can process it automatically, BaseX allows to create and index DB right from XQuery. I hope it helps you. Anyhow, you can provide more details about your task and we can figure out the best solution for you.   On Mon, Jun 25, 2018 at 10:42 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi, Fabrice!Thank you. All databases constantly change.That is why there is no way to single out "a big readonly collection" :(Maybe it is possible to use some other incremental indexes?I have to index specific xml-files, not all files in database. 21.06.2018, 17:16, "Fabrice ETANCHAUD" <fetanch...@pch.cerfrance.fr>:Hi Vladimir, I don’t think there is something like a incremental full text index for the moment [1].As index is per collection, the recommanded way shall be to split your data in two collections :-  A big readonly collection of all the past updates, indexed once-  A small/medium sized collection whom full text index can be recreated in an acceptable time after each update.At the end of a predefined time period, you have to add the live collection to the readonly one, reindex it, and truncate the live one. Best regards from France,Fabrice Etanchaud [1] http://docs.basex.org/wiki/Indexes#UpdatesDe : BaseX-Talk [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de  Envoyé : jeudi 21 juin 2018 16:02À : BaseXObjet : [basex-talk] Full-Text Hi, everyone! Is there any way to index only imported xml-files?Now, when I import xml-files the full-text index is deleted.After importing I recreate whole full-text index and it takes too much time :( -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович --s0rr0w  -- С уважением,Ветошкин Владимир Владимирович --s0rr0w  -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] Full-Text

2018-06-25 Thread Ветошкин Владимир
Alexander, thank you! I'll come back to this task later. 25.06.2018, 13:07, "Alexander Shpack" :Hi, Vladimir, If you will do db names with the particular prefix, for example "db_", you may use the next codelet $docs := for $i in db:list()[starts-with(.,"db_")] return db:open($i)return $docs/* On Mon, Jun 25, 2018 at 12:32 PM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi, Alexander, Some questions:After that, how can I perform a search in all of these databases?Can I search for substring without fulltext using only text index? 25.06.2018, 11:56, "Alexander Shpack" <shadow...@gmail.com>:Hey Vladimir, You can use sharding approach for you data import and split all DBs even every month.  On Mon, Jun 25, 2018 at 11:50 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi, Alexander!Thank you! In my previous letter I have described the proccess in short.I'll think about separated DB. But I'm afraid that this base will also be very big in future.Although I can try to split data to several databases - one per year.. Hmm.. 25.06.2018, 11:25, "Alexander Shpack" <shadow...@gmail.com>:Hey, Vladimir! Just put this specific files to the separated DB and than index it. You can process it automatically, BaseX allows to create and index DB right from XQuery. I hope it helps you. Anyhow, you can provide more details about your task and we can figure out the best solution for you.   On Mon, Jun 25, 2018 at 10:42 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi, Fabrice!Thank you. All databases constantly change.That is why there is no way to single out "a big readonly collection" :(Maybe it is possible to use some other incremental indexes?I have to index specific xml-files, not all files in database. 21.06.2018, 17:16, "Fabrice ETANCHAUD" <fetanch...@pch.cerfrance.fr>:Hi Vladimir, I don’t think there is something like a incremental full text index for the moment [1].As index is per collection, the recommanded way shall be to split your data in two collections :-  A big readonly collection of all the past updates, indexed once-  A small/medium sized collection whom full text index can be recreated in an acceptable time after each update.At the end of a predefined time period, you have to add the live collection to the readonly one, reindex it, and truncate the live one. Best regards from France,Fabrice Etanchaud [1] http://docs.basex.org/wiki/Indexes#UpdatesDe : BaseX-Talk [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de  Envoyé : jeudi 21 juin 2018 16:02À : BaseXObjet : [basex-talk] Full-Text Hi, everyone! Is there any way to index only imported xml-files?Now, when I import xml-files the full-text index is deleted.After importing I recreate whole full-text index and it takes too much time :( -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович --s0rr0w  -- С уважением,Ветошкин Владимир Владимирович --s0rr0w  -- С уважением,Ветошкин Владимир Владимирович --s0rr0w  -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] Full-Text

2018-07-19 Thread Ветошкин Владимир
Hi, Alexander! I have written this task.I have about 50 databases. If I search in each one database separately - it takes about 5-10ms per base.But if I search in "db:list...db:open..." - it takes about 12-15 seconds. Example takes ~12-15s:let $db := for $i in db:list()[starts-with(.,'000999~')] return try {db:open($i)} catch * {}for $doc in $db/.//*[text() contains text { 'TEN-9258' } any]return $doc Example takes ~180ms (returns 2 rows):let $db := for $i in db:list()[starts-with(.,'000999~201807')] return db:open($i)for $doc in $db/.//*[text() contains text { 'TEN-9258' } any]return $doc Example takes ~10ms (returns 2 rows):for $doc in db:open('000999~201807')/.//*[text() contains text { 'TEN-9258' } any]return $doc Why do the last 2 examples take different times?How can I improve this? Example takes ~2s (returns 0 rows):let $db := for $i in db:list()[starts-with(.,'000999~201806')] return db:open($i)for $doc in $db/.//*[text() contains text { 'TEN-9258' } any]return $doc Example takes ~12ms (returns 0 rows):for $doc in db:open('000999~201806')/.//*[text() contains text { 'TEN-9258' } any]return $doc  25.06.2018, 13:07, "Alexander Shpack" :Hi, Vladimir, If you will do db names with the particular prefix, for example "db_", you may use the next codelet $docs := for $i in db:list()[starts-with(.,"db_")] return db:open($i)return $docs/* On Mon, Jun 25, 2018 at 12:32 PM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi, Alexander, Some questions:After that, how can I perform a search in all of these databases?Can I search for substring without fulltext using only text index? 25.06.2018, 11:56, "Alexander Shpack" <shadow...@gmail.com>:Hey Vladimir, You can use sharding approach for you data import and split all DBs even every month.  On Mon, Jun 25, 2018 at 11:50 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi, Alexander!Thank you! In my previous letter I have described the proccess in short.I'll think about separated DB. But I'm afraid that this base will also be very big in future.Although I can try to split data to several databases - one per year.. Hmm.. 25.06.2018, 11:25, "Alexander Shpack" <shadow...@gmail.com>:Hey, Vladimir! Just put this specific files to the separated DB and than index it. You can process it automatically, BaseX allows to create and index DB right from XQuery. I hope it helps you. Anyhow, you can provide more details about your task and we can figure out the best solution for you.   On Mon, Jun 25, 2018 at 10:42 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi, Fabrice!Thank you. All databases constantly change.That is why there is no way to single out "a big readonly collection" :(Maybe it is possible to use some other incremental indexes?I have to index specific xml-files, not all files in database. 21.06.2018, 17:16, "Fabrice ETANCHAUD" <fetanch...@pch.cerfrance.fr>:Hi Vladimir, I don’t think there is something like a incremental full text index for the moment [1].As index is per collection, the recommanded way shall be to split your data in two collections :-  A big readonly collection of all the past updates, indexed once-  A small/medium sized collection whom full text index can be recreated in an acceptable time after each update.At the end of a predefined time period, you have to add the live collection to the readonly one, reindex it, and truncate the live one. Best regards from France,Fabrice Etanchaud [1] http://docs.basex.org/wiki/Indexes#UpdatesDe : BaseX-Talk [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de  Envoyé : jeudi 21 juin 2018 16:02À : BaseXObjet : [basex-talk] Full-Text Hi, everyone! Is there any way to index only imported xml-files?Now, when I import xml-files the full-text index is deleted.After importing I recreate whole full-text index and it takes too much time :( -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович --s0rr0w  -- С уважением,Ветошкин Владимир Владимирович --s0rr0w  -- С уважением,Ветошкин Владимир Владимирович --s0rr0w  -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] Full-Text

2018-07-20 Thread Ветошкин Владимир
Hi, Christian! Thank you again for your help!! Yes, I have the full-text index enabled. I have tried something like this:let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $ifor $db in $dbsfor $doc in db:open($db)/.//*[(# db:enforceindex #) { text() contains text { 'TEN-9258' } any }]return $doc No effect. Then I have tried:let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $ifor $db in $dbslet $ft := ft:search($db, "TEN-9258")/parent::*for $node in $ftreturn root($node) And it works like a charm =) But I don't understand why the first way doesn't work...  20.07.2018, 11:31, "Christian Grün" :Hi Vladimir,  But if I search in "db:list...db:open..." - it takes about 12-15 seconds.If the name of the database is not statically known, the query cannotbe rewritten for index access (because one the targeted database maynot have the required index). I guess you have the full-text indexenabled?However, since BaseX 9, you can take advantage of the ENFORCEINDEXoption: All queries will then optimized for index operations, based onyour knowledge that there an index will be available. See [1] forfurther details.By the way, you can have a look at the compilation section of the InfoView in the GUI to see if indexes will be applied in your query.Best,Christian[1] http://docs.basex.org/wiki/Indexes#Enforce_Rewritings  Example takes ~12-15s: let $db := for $i in db:list()[starts-with(.,'000999~')] return try {db:open($i)} catch * {} for $doc in $db/.//*[text() contains text { 'TEN-9258' } any] return $doc Example takes ~180ms (returns 2 rows): let $db := for $i in db:list()[starts-with(.,'000999~201807')] return db:open($i) for $doc in $db/.//*[text() contains text { 'TEN-9258' } any] return $doc Example takes ~10ms (returns 2 rows): for $doc in db:open('000999~201807')/.//*[text() contains text { 'TEN-9258' } any] return $doc Why do the last 2 examples take different times? How can I improve this? Example takes ~2s (returns 0 rows): let $db := for $i in db:list()[starts-with(.,'000999~201806')] return db:open($i) for $doc in $db/.//*[text() contains text { 'TEN-9258' } any] return $doc Example takes ~12ms (returns 0 rows): for $doc in db:open('000999~201806')/.//*[text() contains text { 'TEN-9258' } any] return $doc 25.06.2018, 13:07, "Alexander Shpack" <shadow...@gmail.com>: Hi, Vladimir, If you will do db names with the particular prefix, for example "db_", you may use the next code let $docs := for $i in db:list()[starts-with(.,"db_")] return db:open($i)return $docs/* On Mon, Jun 25, 2018 at 12:32 PM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, Alexander, Some questions: After that, how can I perform a search in all of these databases? Can I search for substring without fulltext using only text index? 25.06.2018, 11:56, "Alexander Shpack" <shadow...@gmail.com>: Hey Vladimir, You can use sharding approach for you data import and split all DBs even every month. On Mon, Jun 25, 2018 at 11:50 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, Alexander! Thank you! In my previous letter I have described the proccess in short. I'll think about separated DB. But I'm afraid that this base will also be very big in future. Although I can try to split data to several databases - one per year.. Hmm.. 25.06.2018, 11:25, "Alexander Shpack" <shadow...@gmail.com>: Hey, Vladimir! Just put this specific files to the separated DB and than index it.  You can process it automatically, BaseX allows to create and index DB right from XQuery. I hope it helps you. Anyhow, you can provide more details about your task and we can figure out the best solution for you. On Mon, Jun 25, 2018 at 10:42 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, Fabrice! Thank you. All databases constantly change.That is why there is no way to single out "a big readonly collection" :( Maybe it is possible to use some other incremental indexes? I have to index specific xml-files, not all files in database. 21.06.2018, 17:16, "Fabrice ETANCHAUD" <fetanch...@pch.cerfrance.fr>: Hi Vladimir, I don’t think there is something like a incremental full text index for the moment [1]. As index is per collection, the recommanded way shall be to split your data in two collections : - A big readonly collection of all the past updates, indexed once - A small/medium sized collection whom full text index can be recreated in an acceptable time after each update. At the end of a predefined time period, you have to add the live collection to the readonly one, reindex it, and truncate the live one. Best regards from France, Fabrice Etanchaud [1] http://docs.basex.org/wiki/Indexes#Updates De : BaseX-Talk [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De

Re: [basex-talk] Full-Text

2018-07-20 Thread Ветошкин Владимир
Hmm..Yes, it works!But! These examples work differently.1.(# db:enforceindex #) {  for $db in db:list()[starts-with(.,'000999~')]  return db:open($db)//*[text() contains text { 'болт' } any]}378 rows let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $ifor $db in $dbslet $ft := ft:search($db, "болт")/parent::*for $node in $ftreturn $node378 rows 2.(# db:enforceindex #) {  for $db in db:list()[starts-with(.,'000999~')]  return db:open($db)//*[text() contains text { 'автомобиль' } any]}0 rows let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $ifor $db in $dbslet $ft := ft:search($db, "автомобиль")/parent::*for $node in $ftreturn $node2138 rows  Why do they work differently?  20.07.2018, 12:29, "Christian Grün" : let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $i for $db in $dbs for $doc in db:open($db)/.//*[(# db:enforceindex #) { text() contains text { 'TEN-9258' } any }] return $docMaybe you’ll have to use the pragma on top of your _expression_:(# db:enforceindex #) {  for $db in db:list()[starts-with(.,'000999~')]  return db:open($db)//*[text() contains text 'TEN-9258']}As you may have seen, I have simplified `/.//*` to `//*` (but maybe itwas optimized to this representation anyway).Cheers,Christian  -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] Full-Text

2018-07-20 Thread Ветошкин Владимир
Query plan (0 rows):             db:enforceindex                                                                          000999~                                                                                                                                                    автомобиль                                         And query plan (2138 rows):                                                       000999~                                                                                                                      автомобиль                                            20.07.2018, 12:47, "Christian Grün" : These examples work differently.So If I read this correctly, the number of results for 1. is stillidentical, right? However, in the second query in 2., no results arereturned. You could report the query plan will give us some insightinto what happens here.  1. (# db:enforceindex #) {   for $db in db:list()[starts-with(.,'000999~')]   return db:open($db)//*[text() contains text { 'болт' } any] } 378 rows let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $i for $db in $dbs let $ft := ft:search($db, "болт")/parent::* for $node in $ft return $node 378 rows 2. (# db:enforceindex #) {   for $db in db:list()[starts-with(.,'000999~')]   return db:open($db)//*[text() contains text { 'автомобиль' } any] } 0 rows let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $i for $db in $dbs let $ft := ft:search($db, "автомобиль")/parent::* for $node in $ft return $node 2138 rows Why do they work differently?  -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] Full-Text

2018-07-20 Thread Ветошкин Владимир
Christian, you're genius :)Thank you very much for your help! 20.07.2018, 14:19, "Christian Grün" :I think I found the missing pieces:• In your full-text index, you used non-default options (which iscompletely fine)• In the rewritten query, these options cannot applied to your query(because, once again, they are not known at compile time).Your query should yield the expected results if you add the options toyour full-text _expression_:  (# db:enforceindex #) {for $db in db:list()[starts-with(., 'x')]   return db:open($db)//*[text() contains text 'автомобиль' using stemming using language 'ru']  }I added a note in our documentation [1]. Another option is (as youalready found out) to directly use ft:search.Cheers,Christian[1] http://docs.basex.org/wiki/Indexes#Enforce_RewritingsOn Fri, Jul 20, 2018 at 11:54 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:  Query plan (0 rows):db:enforceindex   000999~  автомобиль  And query plan (2138 rows):   000999~   автомобиль20.07.2018, 12:47, "Christian Grün" <christian.gr...@gmail.com>:  These examples work differently. So If I read this correctly, the number of results for 1. is still identical, right? However, in the second query in 2., no results are returned. You could report the query plan will give us some insight into what happens here.  1.  (# db:enforceindex #) {for $db in db:list()[starts-with(.,'000999~')]return db:open($db)//*[text() contains text { 'болт' } any]  }  378 rows  let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $i  for $db in $dbs  let $ft := ft:search($db, "болт")/parent::*  for $node in $ft  return $node  378 rows  2.  (# db:enforceindex #) {for $db in db:list()[starts-with(.,'000999~')]return db:open($db)//*[text() contains text { 'автомобиль' } any]  }  0 rows  let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $i  for $db in $dbs  let $ft := ft:search($db, "автомобиль")/parent::*  for $node in $ft  return $node  2138 rows  Why do they work differently? -- С уважением, Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

[basex-talk] load invalid xml

2018-07-22 Thread Ветошкин Владимир
Hi, everybody! Is there any way to load invalid xml file to database?I have attached an example of such a file. -- С уважением,Ветошкин Владимир Владимирович 
http://www.w3.org/2001/06/soap-envelope"; xmlns:app="urn:customs.ru:Envelope:ApplicationInf:1.0" xmlns:roi="urn:customs.ru:Envelope:RoutingInf:1.0" xmlns:edhead="urn:customs.ru:Envelope:EDHeader:2.0" xmlns:fts="http://www.w3.org/2000/09/xmldsig#"; xmlns:eers="urn:customs.ru:Information:ExchangeDocuments:EPS_EvnResponse:5.10.0" xmlns:cat_ru="urn:customs.ru:CommonAggregateTypes:5.10.0" xmlns:env="http://www.w3.org/2001/06/soap-envelope"; xmlns:app="urn:customs.ru:Envelope:ApplicationInf:1.0" xmlns:roi="urn:customs.ru:Envelope:RoutingInf:1.0" xmlns:edhead="urn:customs.ru:Envelope:EDHeader:2.0" xmlns:fts="http://www.w3.org/2000/09/xmldsig#"; xmlns:eers="urn:customs.ru:Information:ExchangeDocuments:EPS_EvnResponse:5.10.0" xmlns:cat_ru="urn:customs.ru:CommonAggregateTypes:5.10.0">3eaf5eef-5d21-431b-82c2-f38ae9b416ab254DE19F-3D6A-4C8D-B022-344036935BAEwmq://RU.FTS.ASVD.EPS/GW.EPS.DECL.FROMwmq://RU.FTS.ASVD.EPS/EPS.ALTASOFT.TO2017-08-08T10:07:57.118+10:005.12.0/3.3.11CMN.2029aca11-b0e7-43f7-ab70-8042e100d07e10277390467521070203019200http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411"; />http://www.w3.org/2001/04/xmldsig-more#gostr3411"; />zHU9BV01Zf4xcK5TZKbGI2fYD+TEmWRfwWS7knwM01U=http://www.w3.org/2001/04/xmldsig-more#gostr3411"; />7R20tV6TNK08YF4X/FM57ior4JgTSy9lsTYvDaNEymc=MIIExgYJKoZIhvcNAQcCoIIEtzCCBLMCAQExDDAKBgYqhQMCAgkFADALBgkqhkiG9w0BBwExggSRMIIEjQIBATCCAbMwggGjMSAwHgYJKoZIhvcNAQkBFhF2dWNAY2EuY3VzdG9tcy5ydTEaMBgGCCqFAwOBAwEBEgwwMDc3MzA2NTQ0NzExGDAWBgUqhQNkARINMTExNzc0Njg4OTk0MTF7MHkGA1UECgxy0KbQtdC90YLRgNCw0LvRjNC90L7QtSDQuNC90YTQvtGA0LzQsNGG0LjQvtC90L3Qvi3RgtC10YXQvdC40YfQtdGB0LrQvtC1INGC0LDQvNC+0LbQtdC90L3QvtC1INGD0L/RgNCw0LLQu9C10L3QuNC1MTowOAYDVQQJDDHQv9C7LtCa0L7QvNGB0L7QvNC+0LvRjNGB0LrQsNGPINC0LjEg0LrQvtGA0L8uINCQMRUwEwYDVQQHDAzQnNC+0YHQutCy0LAxGzAZBgNVBAgMEjc3INCzLtCc0L7RgdC60LLQsDELMAkGA1UEBhMCUlUxTzBNBgNVBAMMRtCT0L7Qu9C+0LLQvdC+0Lkg0YPQtNC+0YHRgtC+0LLQtdGA0Y/RjtGJ0LjQuSDRhtC10L3RgtGAINCh0JLQo9CmINCi0J4CCkQfLYwAAQACc+AwCgYGKoUDAgIJBQCgggJ1MBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTE3MDgwODAwMDc1N1owLwYJKoZIhvcNAQkEMSIEII8bYI4Yeu94seuuHmEa2bnbtYOeh6ev7lJCrdbZ4fXTMIICCAYLKoZIhvcNAQkQAi8xggH3MIIB8zCCAe8wggHrMAgGBiqFAwICCQQgr6NUPm2xJL5tRYVV4G8DMjt7tJq1Zme6NTcOExB9ruowggG7MIIBq6SCAacwggGjMSAwHgYJKoZIhvcNAQkBFhF2dWNAY2EuY3VzdG9tcy5ydTEaMBgGCCqFAwOBAwEBEgwwMDc3MzA2NTQ0NzExGDAWBgUqhQNkARINMTExNzc0Njg4OTk0MTF7MHkGA1UECgxy0KbQtdC90YLRgNCw0LvRjNC90L7QtSDQuNC90YTQvtGA0LzQsNGG0LjQvtC90L3Qvi3RgtC10YXQvdC40YfQtdGB0LrQvtC1INGC0LDQvNC+0LbQtdC90L3QvtC1INGD0L/RgNCw0LLQu9C10L3QuNC1MTowOAYDVQQJDDHQv9C7LtCa0L7QvNGB0L7QvNC+0LvRjNGB0LrQsNGPINC0LjEg0LrQvtGA0L8uINCQMRUwEwYDVQQHDAzQnNC+0YHQutCy0LAxGzAZBgNVBAgMEjc3INCzLtCc0L7RgdC60LLQsDELMAkGA1UEBhMCUlUxTzBNBgNVBAMMRtCT0L7Qu9C+0LLQvdC+0Lkg0YPQtNC+0YHRgtC+0LLQtdGA0Y/RjtGJ0LjQuSDRhtC10L3RgtGAINCh0JLQo9CmINCi0J4CCkQfLYwAAQACc+AwCgYGKoUDAgITBQAEQNDMQ6c82VjHeEd8xJIPXOJOQjXDRh/uXg8tZISrzteQeP70Pg1THMtrw0r5vCHaS/gXWd+4bHD8YP9u50bq1uo=MIILQDCCCu+gAwIBAgIKRB8tjAABAAJz4DAIBgYqhQMCAgMwggGjMSAwHgYJKoZIhvcNAQkBFhF2dWNAY2EuY3VzdG9tcy5ydTEaMBgGCCqFAwOBAwEBEgwwMDc3MzA2NTQ0NzExGDAWBgUqhQNkARINMTExNzc0Njg4OTk0MTF7MHkGA1UECgxy0KbQtdC90YLRgNCw0LvRjNC90L7QtSDQuNC90YTQvtGA0LzQsNGG0LjQvtC90L3Qvi3RgtC10YXQvdC40YfQtdGB0LrQvtC1INGC0LDQvNC+0LbQtdC90L3QvtC1INGD0L/RgNCw0LLQu9C10L3QuNC1MTowOAYDVQQJDDHQv9C7LtCa0L7QvNGB0L7QvNC+0LvRjNGB0LrQsNGPINC0LjEg0LrQvtGA0L8uINCQMRUwEwYDVQQHDAzQnNC+0YHQutCy0LAxGzAZBgNVBAgMEjc3INCzLtCc0L7RgdC60LLQsDELMAkGA1UEBhMCUlUxTzBNBgNVBAMMRtCT0L7Qu9C+0LLQvdC+0Lkg0YPQtNC+0YHRgtC+0LLQtdGA0Y/RjtGJ0LjQuSDRhtC10L3RgtGAINCh0JLQo9CmINCi0J4wHhcNMTYxMDAzMDY0ODAwWhcNMTgxMDAzMDY1NzAwWjCCAhgxGDAWBgUqhQNkARINMTAyODcwMDU4NjU0MDEaMBgGCCqFAwOBAwEBEgwwMDI1NDAwMTU0OTIxJzAlBgkqhkiG9w0BCQEWGGR2dHVfb2ZwQGR2dHUuY3VzdG9tcy5ydTELMAkGA1UEBhMCUlUxLTArBgNVBAgeJAAyADUAIAQfBEAEOAQ8BD4EQARBBDoEOAQ5ACAEOgRABDAEOTEfMB0GA1UEBx4WBBIEOwQwBDQEOAQyBD4EQQRCBD4EOjFTMFEGA1UECh5KBBQEMAQ7BEwEPQQ1BDIEPgRBBEIEPgRHBD0EPgQ1ACAEQgQwBDwEPgQ2BDUEPQQ9BD4ENQAgBEMEPwRABDAEMgQ7BDUEPQQ4BDUxFzAVBgNVBAseDgQeBC0EJAQfBDgEGAQeMVMwUQYDVQQDHkoEFAQwBDsETAQ9BDUEMgQ+BEEEQgQ+BEcEPQQ+BDUAIARCBDAEPAQ+BDYENQQ9BD0EPgQ1ACAEQwQ/BEAEMAQyBDsENQQ9BDgENTEpMCcGA1UECR4gBEMEOwAuACAEEwQ+BDMEPgQ7BE8AIAQ0AC4AIAA0ADgxGzAZBgNVBCoeEgQQBBgEIQAgBB4EQAQ0BDUEQDFPME0GA1UEBB5GBCIENQRFBD0EPgQ7BD4EMwQ4BEcENQRBBDoEMARPACAETQQ7BDUEOgRCBEAEPgQ9BD0EMARPACAEPwQ+BDQEPwQ4BEEETDBjMBwGBiqFAwICEzASBgcqhQMCAiQABgcqhQMCAh4BA0MABEDS+lcQpZ2VCijgFZ15lwjDrMQYHw24xMXpm62GkL3fIKS6dRM9MLMLfGGOPqovRsjak8MqlAKzpZeoI+sJm4Dgo4IGiDCCBoQwDgYDVR0PAQH/BAQDAgTwMCYGA1UdJQQfMB0GByqFAwOBVwIGCCsGAQUFBwMEBggrBgEFBQcDAjAdBgNVHQ4EFgQUTyX0Unq1EeeJWAZvAB8QWWBj5aswggHdBgNVHSMEggHUMIIB0IAUsDsQyUlfM/MOs13WDjoR84bOnIahggGqpIIBpjCCAaIxIDAeBgkqhkiG9w0BCQEWEXZ1Y

Re: [basex-talk] Full-Text

2018-07-22 Thread Ветошкин Владимир
Hi! After some tests of search (using stemming, using language ru) I have found several problems.E.g.:if search for "кузов" - it doesn't find "кузова"  20.07.2018, 14:26, "Ветошкин Владимир" :Christian, you're genius :)Thank you very much for your help! 20.07.2018, 14:19, "Christian Grün" <christian.gr...@gmail.com>:I think I found the missing pieces:• In your full-text index, you used non-default options (which iscompletely fine)• In the rewritten query, these options cannot applied to your query(because, once again, they are not known at compile time).Your query should yield the expected results if you add the options toyour full-text _expression_:  (# db:enforceindex #) {for $db in db:list()[starts-with(., 'x')]   return db:open($db)//*[text() contains text 'автомобиль' using stemming using language 'ru']  }I added a note in our documentation [1]. Another option is (as youalready found out) to directly use ft:search.Cheers,Christian[1] http://docs.basex.org/wiki/Indexes#Enforce_RewritingsOn Fri, Jul 20, 2018 at 11:54 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:  Query plan (0 rows):db:enforceindex   000999~  автомобиль  And query plan (2138 rows):   000999~   автомобиль20.07.2018, 12:47, "Christian Grün" <christian.gr...@gmail.com>:  These examples work differently. So If I read this correctly, the number of results for 1. is still identical, right? However, in the second query in 2., no results are returned. You could report the query plan will give us some insight into what happens here.  1.  (# db:enforceindex #) {for $db in db:list()[starts-with(.,'000999~')]return db:open($db)//*[text() contains text { 'болт' } any]  }  378 rows  let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $i  for $db in $dbs  let $ft := ft:search($db, "болт")/parent::*  for $node in $ft  return $node  378 rows  2.  (# db:enforceindex #) {for $db in db:list()[starts-with(.,'000999~')]return db:open($db)//*[text() contains text { 'автомобиль' } any]  }  0 rows  let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $i  for $db in $dbs  let $ft := ft:search($db, "автомобиль")/parent::*  for $node in $ft  return $node  2138 rows  Why do they work differently? -- С уважением, Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

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 stemmers that are available in the wild? Ветошкин Владимир <en-tra...@yandex.ru> schrieb am So., 22. Juli 2018, 14:30:Hi! After some tests of search (using stemming, using language ru) I have found several problems.E.g.:if search for "кузов" - it doesn't find "кузова"  20.07.2018, 14:26, "Ветошкин Владимир" <en-tra...@yandex.ru>:Christian, you're genius :)Thank you very much for your help! 20.07.2018, 14:19, "Christian Grün" <christian.gr...@gmail.com>:I think I found the missing pieces:• In your full-text index, you used non-default options (which iscompletely fine)• In the rewritten query, these options cannot applied to your query(because, once again, they are not known at compile time).Your query should yield the expected results if you add the options toyour full-text _expression_:  (# db:enforceindex #) {for $db in db:list()[starts-with(., 'x')]   return db:open($db)//*[text() contains text 'автомобиль' using stemming using language 'ru']  }I added a note in our documentation [1]. Another option is (as youalready found out) to directly use ft:search.Cheers,Christian[1] http://docs.basex.org/wiki/Indexes#Enforce_RewritingsOn Fri, Jul 20, 2018 at 11:54 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:  Query plan (0 rows):db:enforceindex   000999~  автомобиль  And query plan (2138 rows):   000999~   автомобиль20.07.2018, 12:47, "Christian Grün" <christian.gr...@gmail.com>:  These examples work differently. So If I read this correctly, the number of results for 1. is still identical, right? However, in the second query in 2., no results are returned. You could report the query plan will give us some insight into what happens here.  1.  (# db:enforceindex #) {for $db in db:list()[starts-with(.,'000999~')]return db:open($db)//*[text() contains text { 'болт' } any]  }  378 rows  let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $i  for $db in $dbs  let $ft := ft:search($db, "болт")/parent::*  for $node in $ft  return $node  378 rows  2.  (# db:enforceindex #) {for $db in db:list()[starts-with(.,'000999~')]return db:open($db)//*[text() contains text { 'автомобиль' } any]  }  0 rows  let $dbs := for $i in db:list()[starts-with(.,'000999~')] return $i  for $db in $dbs  let $ft := ft:search($db, "автомобиль")/parent::*  for $node in $ft  return $node  2138 rows  Why do they work differently? -- С уважением, Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

[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] 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. 23.07.2018, 11:50, "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 possible to ignore namespaces?Sorry, I can just repeat what I’ve written in my last mail. XMLparsers rely on well-formed input. Everything else would be a hack.And there are just too many possible error cases that would need to beconsidered by such “tweaks”.Could you please tell me more about the external system?  PS: I have to store data with querying it.Did you then try to store the documents as raw data, as described in our docs?  22.07.2018, 18:48, "Christian Grün" <christian.gr...@gmail.com>: One nice property of XML is that documents must be well-formed (i.e., syntactically valid) in order to be processed. If a document is not valid, there may be more than one way to interpret is contents – and this can get dangerous. If you have invalid XML, you should go back to the origins and find out what went wrong in the very beginning. If you only want to store data without querying it, you can store a document as binary (raw) data. Feel free to check out our documentation to find more details. Ветошкин Владимир <en-tra...@yandex.ru> schrieb am So., 22. Juli 2018, 09:44: Hi, everybody! Is there any way to load invalid xml file to database? I have attached an example of such a file. -- С уважением, Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

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 - $time_start);echo $execution_time; I'll try to do this:>> you could e.g. write a little self-contained XQuery _expression_ that creates data of the same size.  23.07.2018, 11:53, "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 moreinformation, such as a minimized code example that demonstrates yourobservations. Instead of providing your original data, you could e.g.write a little self-contained XQuery _expression_ that creates data ofthe same size.  -- С уважением,Ветошкин Владимир Владимирович 

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 measuring execution time:$time_start = microtime(true);while ($query->more()) {$q = $query->next();}$time_end = microtime(true);$execution_time = ($time_end - $time_start);echo $execution_time; I'll try to do this:>> you could e.g. write a little self-contained XQuery _expression_ that creates data of the same size.  23.07.2018, 11:53, "Christian Grün" <christian.gr...@gmail.com>: 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 moreinformation, such as a minimized code example that demonstrates yourobservations. Instead of providing your original data, you could e.g.write a little self-contained XQuery _expression_ that creates data ofthe same size.  -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

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 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 runninga) execute('xquery ...')b) query('...') and more()/next() ?I don’t know much about PHP. Maybe there are simple ways to improvethe performance of our client [1]? Suggestions are welcome.Best,Christian[1] https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/php/BaseXClient.phpOn Mon, Jul 23, 2018 at 11:35 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:  The query: for $i in (1 to 50) return $i In GUI: 200ms In PHP: 25sec. it is because of the result size, is it? 23.07.2018, 12:24, "Ветошкин Владимир" <en-tra...@yandex.ru>: 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 - $time_start); echo $execution_time; I'll try to do this: >> you could e.g. write a little self-contained XQuery _expression_ that creates data of the same size. 23.07.2018, 11:53, "Christian Grün" <christian.gr...@gmail.com>:  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 minimized code example that demonstrates your observations. Instead of providing your original data, you could e.g. write a little self-contained XQuery _expression_ that creates data of the same size. -- С уважением, Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

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 size (the numberof results has an effect as well, but it doesn’t seem to be thatdominant). The Java client is much faster indeed. I assume you havecommunicated with your local BaseX instance?  >> 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" <christian.gr...@gmail.com>: 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() ? I don’t know much about PHP. Maybe there are simple ways to improve the performance of our client [1]? Suggestions are welcome. Best, Christian [1] https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/php/BaseXClient.php On Mon, Jul 23, 2018 at 11:35 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:  The query:  for $i in (1 to 50)  return $i  In GUI: 200ms  In PHP: 25sec.  it is because of the result size, is it?  23.07.2018, 12:24, "Ветошкин Владимир" <en-tra...@yandex.ru>:  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 - $time_start);  echo $execution_time;  I'll try to do this:  >> you could e.g. write a little self-contained XQuery _expression_ that creates data of the same size.  23.07.2018, 11:53, "Christian Grün" <christian.gr...@gmail.com>:   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 minimized code example that demonstrates your  observations. Instead of providing your original data, you could e.g.  write a little self-contained XQuery _expression_ that creates data of  the same size.  --  С уважением,  Ветошкин Владимир Владимирович  --  С уважением,  Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

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 instance?Yes,$session = new Session("localhost", $this->dbport, $this->dblogin, $this->dbpass); 23.07.2018, 13:19, "Christian Grün" <christian.gr...@gmail.com>: 1. in GUI ~200ms, in PHP ~17sec 2a. ~23sec 2b. ~17secI see. So this clearly indicates that it’s the result size (the numberof results has an effect as well, but it doesn’t seem to be thatdominant). The Java client is much faster indeed. I assume you havecommunicated with your local BaseX instance?  >> 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" <christian.gr...@gmail.com>: 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() ? I don’t know much about PHP. Maybe there are simple ways to improve the performance of our client [1]? Suggestions are welcome. Best, Christian [1] https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/php/BaseXClient.php On Mon, Jul 23, 2018 at 11:35 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:  The query:  for $i in (1 to 500000)  return $i  In GUI: 200ms  In PHP: 25sec.  it is because of the result size, is it?  23.07.2018, 12:24, "Ветошкин Владимир" <en-tra...@yandex.ru>:  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 - $time_start);  echo $execution_time;  I'll try to do this:  >> you could e.g. write a little self-contained XQuery _expression_ that creates data of the same size.  23.07.2018, 11:53, "Christian Grün" <christian.gr...@gmail.com>:   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 minimized code example that demonstrates your  observations. Instead of providing your original data, you could e.g.  write a little self-contained XQuery _expression_ that creates data of  the same size.  --  С уважением,  Ветошкин Владимир Владимирович  --  С уважением,  Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

[basex-talk] release read lock

2018-08-16 Thread Ветошкин Владимир
Hi! Is there a way to cache data and release read lock ?I have to get some data from DB and then make some actions with it, that takes a long time. I would like to release lock after getting data from the DB. -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] release read lock

2018-08-17 Thread Ветошкин Владимир
Hi, Christian! That is the similar query I sent you in previous letters (where first query is to database e.g. 'sirukov' and then some queries to several bases). Have you experience with basex in high-load projects?I fear that I'm wrong in choosing basex as a database for storaging xml-data, because the project must be scalable and in prospect it would be multiuser (about 1000 users or more).Every day there will be many xml-files loading to server.I have a decision to make - continue working with basex or look for another solution.  17.08.2018, 09:25, "Christian Grün" :Hi Владимир,Databases will stay opened until the full query has been evaluated.One of the reasons is that it’s not trivial to detect when the lastrelevant read operation will take place in a query.Could you share your query with us (or relevant parts of it)?Best,ChristianOn Thu, Aug 16, 2018 at 11:44 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:  Hi! Is there a way to cache data and release read lock ? I have to get some data from DB and then make some actions with it, that takes a long time. I would like to release lock after getting data from the DB. -- С уважением, Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

[basex-talk] archive:create

2018-08-17 Thread Ветошкин Владимир
Hi! I want to write xml-data to zip-archive. I try something like this:                 let $db := db:open('test')                let $doc := $db/doc[id='cb818e0d-7d49-4f78-8424-49e063d3efdf']                let $zip := archive:create(file.txt, $doc)                return file:write-binary('test.zip', $zip) It writes only string.How can I write full xml-data ?  -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] archive:create

2018-08-17 Thread Ветошкин Владимир
Christian, thank you very much!It works! :) 17.08.2018, 17:58, "Christian Grün" :Try serialize($doc) instead of $doc. Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Fr., 17. Aug. 2018, 16:55:Hi! I want to write xml-data to zip-archive. I try something like this:                 let $db := db:open('test')                let $doc := $db/doc[id='cb818e0d-7d49-4f78-8424-49e063d3efdf']                let $zip := archive:create(file.txt, $doc)                return file:write-binary('test.zip', $zip) It writes only string.How can I write full xml-data ?  -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

[basex-talk] archive

2018-08-21 Thread Ветошкин Владимир
Hi! Because of the size, is there a way to store xml-data as archive (with possibility to search) ? -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] archive

2018-08-22 Thread Ветошкин Владимир
I can compress xml-data and store it in db.But then how can I search inside that db using index? Is it possible? 22.08.2018, 17:28, "Christian Grün" : Because of the size, is there a way to store xml-data as archiveIf you want to compress your XML documents with XQuery, you can have alook at the Archive or ZIP Module of BaseX. I am not sure, however, ifthis is what you are looking for?  (with possibility to search) ?The BaseX implementation of fn:doc() and fn:collection() supportszipped files as arguments. The contents will be unzippedautomatically:  collection('my-xml-files.zip')If you create databases, you can specify ZIP files as input, too.  -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] archive

2018-08-22 Thread Ветошкин Владимир
Fabrice, Christian, I hope you are all doing well! :)Thank you for your answers!And I work on my english)22.08.2018, 18:31, "Christian Grün" :Hi Fabrice,Thanks for your response to Vladimir.You are completely right, BaseX has its own compression algorithms(without compression, databases would be much larger). Due to thequery update facilities and additional index structures, a databasewill always cosume more space than zipped XML documents.CheersChristianOn Wed, Aug 22, 2018 at 5:24 PM Fabrice ETANCHAUD<fetanch...@pch.cerfrance.fr> wrote: Hi Vladimir, If your question is : is there a compression option to reduce database files and use built-in index features ? the answer is no. I can remember that BaseX use custom compression for text nodes. [1] Christian, I hope you are doing well ? Did I loose my mind or Did BaseX have a long time ago a compressed database option ? Best regards, [1] http://basex.org/2018/03/23/basex-9.0--the-spring-edition/ BaseX -Message d'origine- De : BaseX-Talk [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de Christian Grün Envoyé : mercredi 22 août 2018 17:08 À : Ветошкин Владимир Cc : BaseX Objet : Re: [basex-talk] archive > I can compress xml-data and store it in db. > But then how can I search inside that db using index? Is it possible? I am not sure if I understand. How do you proceed? Could you possibly give us a step-by-step explanation?--С уважением, Ветошкин Владимир Владимирович

[basex-talk] rest parallel

2018-08-25 Thread Ветошкин Владимир
Hi! Why do requests to RESTXQ wait for finishing each other?For example:declare  %rest:path("/test")  %rest:GET  function page:test(){  prof:sleep(5000)}; If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec. -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] rest parallel

2018-08-25 Thread Ветошкин Владимир
Hi, Christian! Oh, yes, I test it on an old single-core system :)Is it the reason?In DBA only one job listed. When the first "test" finish, in job list appers the second job. 25.08.2018, 21:15, "Christian Grün" :Hi Vladimir,parallel sleep requests will be evaluated in parallel indeed (see theattached screenshot). How did you test this?If you have an old single-core system, it might happen that only onejob will be executed at a time; but all jobs should be listed in theDBA, or when calling jobs:list-details().Best,Christian  Why do requests to RESTXQ wait for finishing each other? For example: declare   %rest:path("/test")   %rest:GET   function page:test() {   prof:sleep(5000) }; If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec.  -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] rest parallel

2018-08-25 Thread Ветошкин Владимир
Hmm.. When I request "test" in 2 tabs of chrome - only one job appears.But when I request the first "test" in one tab and the second "test" in another browser (or in incognito tab) - two jobs appears. 25.08.2018, 21:36, "Ветошкин Владимир" :Hi, Christian! Oh, yes, I test it on an old single-core system :)Is it the reason?In DBA only one job listed. When the first "test" finish, in job list appers the second job. 25.08.2018, 21:15, "Christian Grün" <christian.gr...@gmail.com>:Hi Vladimir,parallel sleep requests will be evaluated in parallel indeed (see theattached screenshot). How did you test this?If you have an old single-core system, it might happen that only onejob will be executed at a time; but all jobs should be listed in theDBA, or when calling jobs:list-details().Best,Christian  Why do requests to RESTXQ wait for finishing each other? For example: declare   %rest:path("/test")   %rest:GET   function page:test() {   prof:sleep(5000) }; If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec.  -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] rest parallel

2018-08-25 Thread Ветошкин Владимир
That seems to be the case.Thanks. 25.08.2018, 22:18, "Christian Grün" :I see. So this must be an issue with Chrome (and, possibly, requests to localhost).  Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Sa., 25. Aug. 2018, 21:16:Hmm.. When I request "test" in 2 tabs of chrome - only one job appears.But when I request the first "test" in one tab and the second "test" in another browser (or in incognito tab) - two jobs appears. 25.08.2018, 21:36, "Ветошкин Владимир" <en-tra...@yandex.ru>:Hi, Christian! Oh, yes, I test it on an old single-core system :)Is it the reason?In DBA only one job listed. When the first "test" finish, in job list appers the second job. 25.08.2018, 21:15, "Christian Grün" <christian.gr...@gmail.com>:Hi Vladimir,parallel sleep requests will be evaluated in parallel indeed (see theattached screenshot). How did you test this?If you have an old single-core system, it might happen that only onejob will be executed at a time; but all jobs should be listed in theDBA, or when calling jobs:list-details().Best,Christian  Why do requests to RESTXQ wait for finishing each other? For example: declare   %rest:path("/test")   %rest:GET   function page:test() {   prof:sleep(5000) }; If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec.  -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] rest parallel

2018-08-29 Thread Ветошкин Владимир
Hi! Why are there max 7 jobs in the job list?I have tried changing PARALLEL parameter - no effect. 25.08.2018, 22:39, "Ветошкин Владимир" :That seems to be the case.Thanks. 25.08.2018, 22:18, "Christian Grün" <christian.gr...@gmail.com>:I see. So this must be an issue with Chrome (and, possibly, requests to localhost).  Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Sa., 25. Aug. 2018, 21:16:Hmm.. When I request "test" in 2 tabs of chrome - only one job appears.But when I request the first "test" in one tab and the second "test" in another browser (or in incognito tab) - two jobs appears. 25.08.2018, 21:36, "Ветошкин Владимир" <en-tra...@yandex.ru>:Hi, Christian! Oh, yes, I test it on an old single-core system :)Is it the reason?In DBA only one job listed. When the first "test" finish, in job list appers the second job. 25.08.2018, 21:15, "Christian Grün" <christian.gr...@gmail.com>:Hi Vladimir,parallel sleep requests will be evaluated in parallel indeed (see theattached screenshot). How did you test this?If you have an old single-core system, it might happen that only onejob will be executed at a time; but all jobs should be listed in theDBA, or when calling jobs:list-details().Best,Christian  Why do requests to RESTXQ wait for finishing each other? For example: declare   %rest:path("/test")   %rest:GET   function page:test() {   prof:sleep(5000) }; If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec.  -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] rest parallel

2018-08-29 Thread Ветошкин Владимир
Oh, it's browser =)  Max Number of default simultaneous persistent connections per server/proxy: Firefox 2: 2Firefox 3+: 6Opera 9.26: 4Opera 12: 6Safari 3: 4Safari 5: 6IE 7: 2IE 8: 6IE 10: 8IE 11: 12Chrome: 6  29.08.2018, 11:18, "Christian Grün" :There can be much more jobs in the list, so once again I guess it’srelated to your testing environment. Feel free to give us moredetails.On Wed, Aug 29, 2018 at 9:20 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:  Hi! Why are there max 7 jobs in the job list? I have tried changing PARALLEL parameter - no effect. 25.08.2018, 22:39, "Ветошкин Владимир" <en-tra...@yandex.ru>: That seems to be the case. Thanks. 25.08.2018, 22:18, "Christian Grün" <christian.gr...@gmail.com>: I see. So this must be an issue with Chrome (and, possibly, requests to localhost). Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Sa., 25. Aug. 2018, 21:16: Hmm.. When I request "test" in 2 tabs of chrome - only one job appears. But when I request the first "test" in one tab and the second "test" in another browser (or in incognito tab) - two jobs appears. 25.08.2018, 21:36, "Ветошкин Владимир" <en-tra...@yandex.ru>: Hi, Christian! Oh, yes, I test it on an old single-core system :) Is it the reason? In DBA only one job listed. When the first "test" finish, in job list appers the second job. 25.08.2018, 21:15, "Christian Grün" <christian.gr...@gmail.com>: Hi Vladimir, parallel sleep requests will be evaluated in parallel indeed (see the attached screenshot). How did you test this? If you have an old single-core system, it might happen that only one job will be executed at a time; but all jobs should be listed in the DBA, or when calling jobs:list-details(). Best, Christian  Why do requests to RESTXQ wait for finishing each other?  For example:  declare%rest:path("/test")%rest:GETfunction page:test()  {prof:sleep(5000)  };  If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec. -- С уважением, Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

[basex-talk] ubuntu 18.04 (bionic)

2019-01-31 Thread Ветошкин Владимир
Hi! There is only 8.5.1 version for Ubuntu 18.04 at url https://launchpad.net/basex/+packagesIs there 9 version for that Ubuntu ? Thx -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] ubuntu 18.04 (bionic)

2019-01-31 Thread Ветошкин Владимир
Hi, Michael, Is that the only way to install it to ubuntu 18.04?  31.01.2019, 12:27, "Michael Seiferle" :Hi,  feel free to use the ZIP-file provided at http://files.basex.org/releases/9.1.2/ it should be up to date :)  BestMichael  On Thu, Jan 31, 2019 at 10:23 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi! There is only 8.5.1 version for Ubuntu 18.04 at url https://launchpad.net/basex/+packagesIs there 9 version for that Ubuntu ? Thx -- С уважением,Ветошкин Владимир Владимирович   Michael Seiferle, BaseX GmbH, http://basex.org|-- Firmensitz: Obere Laube 73, 78462 Konstanz|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:|   Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle`-- Fon: +49 7531 28 28 676, Fax: +49 7531 20 05 22  -- С уважением,Ветошкин Владимир Владимирович 

[basex-talk] x509

2019-07-04 Thread Ветошкин Владимир
Hi! Does basex have functions to generate or get information from x509certificate?(like xdmp:x509-certificate-* in MarkLogic) -- С уважением,Ветошкин Владимир Владимирович 


[basex-talk] server load

2019-07-05 Thread Ветошкин Владимир
Hi BaseX team, I have uploaded about 3700 xml-files (450mb) to db.CPU usage at that time was about 100%.Is there any way to reduce the server load?May be basex has some kind of settings? Thank you  -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] server load

2019-07-06 Thread Ветошкин Владимир
Yes, it's test server. It has only 1 core and 500mb ram + 500mp swap. 05.07.2019, 22:03, "Christian Grün" : I have uploaded about 3700 xml-files (450mb) to db. CPU usage at that time was about 100%. Is there any way to reduce the server load? May be basex has some kind of settings?Usually the I/O usage should be higher than the CPU usage. How muchRAM do you have, and how many CPUs cores are available on your system(I guess only 1 of the cores was used)?  -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] x509

2019-07-06 Thread Ветошкин Владимир
Claudius, Christian, thank you!I'll look forward to it! 05.07.2019, 22:26, "Claudius Teodorescu" :Hi, The next version of the specification, which I am currently working on, will include such function. Claudius On Fri, Jul 5, 2019 at 10:02 PM Christian Grün <christian.gr...@gmail.com> wrote:Hi Владимир,Currently no. But maybe this could be included in the latest versionof the the EXPath Cryptography Module [1] (cc @Claudius)?Best,Christian[1] http://expath.org/spec/crypto/editorOn Thu, Jul 4, 2019 at 5:01 PM Ветошкин Владимир <en-tra...@yandex.ru> wrote:>> Hi!>> Does basex have functions to generate or get information from x509certificate?> (like xdmp:x509-certificate-* in MarkLogic)>> --> С уважением,> Ветошкин Владимир Владимирович>--http://kuberam.ro  -- С уважением,Ветошкин Владимир Владимирович 

[basex-talk] read file permissions

2019-08-20 Thread Ветошкин Владимир
Hi, everybody. I think my goal is simple, but I don't how to solve it :)How to grant user to read the file (xml)? Or all files in a directory.The user has only permissions to read some databases. -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] read file permissions

2019-08-21 Thread Ветошкин Владимир
Hi, Christian! Thank you!The files could be used in the future and I have decided to put these files to the database.It's much easier for me :)  21.08.2019, 17:56, "Christian Grün" :Hi Владимир,BaseX has access permissions on global and on database level [1]. Ifyou want to restrict permission to specific collection paths andresources (documents, binary files), you will need to add someserver-side application logic and e.g. use RESTXQ as access layer.Best,Christian[1] http://docs.basex.org/wiki/User_Management#Operationshttp://docs.basex.org/wiki/User_Management#OperationsOn Tue, Aug 20, 2019 at 3:20 PM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, everybody. I think my goal is simple, but I don't how to solve it :) How to grant user to read the file (xml)? Or all files in a directory. The user has only permissions to read some databases. -- С уважением, Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

[basex-talk] db:optimize

2020-01-28 Thread Ветошкин Владимир
Hi, everybody! I use basex+php.When I call db:optimize('A') from basex gui I can read from db 'B'.But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working.Why? And how can I solve it?I wracked my brain... -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] db:optimize

2020-01-29 Thread Ветошкин Владимир
Thank you.But I want non-blocking read/write operations (in different databases) with php. Is it possible?Or I only have to wait finishing update operation? 29.01.2020, 12:02, "first name last name" :But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1].However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server[2] http://docs.basex.org/wiki/DBA  On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcod...@gmail.com> wrote:"For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi, everybody! I use basex+php.When I call db:optimize('A') from basex gui I can read from db 'B'.But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working.Why? And how can I solve it?I wracked my brain... -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] db:optimize

2020-01-29 Thread Ветошкин Владимир
Hi, Christian! I hope you're well.No, there is only one client at this time.Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize...").And while it was working I can read from other databases like a charm! :)As I can see, it solves my problems. Am I right doing so?29.01.2020, 20:28, "Christian Grün" :Hi Владимир, But I want non-blocking read/write operations (in different databases) with php. Is it possible? Or I only have to wait finishing update operation?I haven’t done anything with PHP for more than 10 years now, but maybeyou need to use parallel or pthreads and do the work via multiplethreads. Are you already working with several BaseX client instances?ChristianOn Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Thank you. 29.01.2020, 12:02, "first name last name" <randomcod...@gmail.com>: But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server [2] http://docs.basex.org/wiki/DBA On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcod...@gmail.com> wrote: "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, everybody! I use basex+php. When I call db:optimize('A') from basex gui I can read from db 'B'. But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. Why? And how can I solve it? I wracked my brain... -- С уважением, Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович--С уважением, Ветошкин Владимир Владимирович

Re: [basex-talk] db:optimize

2020-01-29 Thread Ветошкин Владимир
Yes, the system works on php and I can call basex only via php client of basex or exec function.Now all functions work via php client of basex.If I additionally will use exec with basexclient - it won't corrupt databases?29.01.2020, 21:27, "Christian Grün" :In the worst case, yes. If you prefer to call basex via php and exec, invoke basexclient instead of basex:http://docs.basex.org/wiki/Database_ServerВетошкин Владимир <en-tra...@yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:23:Yes, I have seen that wiki pages...What kind of conflicts?Do you mean "or may even lead to corrupt databases." ?Now I only get error when I read updating database like "database is updating..."29.01.2020, 21:11, "Christian Grün" <christian.gr...@gmail.com>:> As I can see, it solves my problems. Am I right doing so?The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"?Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05:Hi, Christian! I hope you're well.No, there is only one client at this time.Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize...").And while it was working I can read from other databases like a charm! :)As I can see, it solves my problems. Am I right doing so?29.01.2020, 20:28, "Christian Grün" <christian.gr...@gmail.com>:Hi Владимир, But I want non-blocking read/write operations (in different databases) with php. Is it possible? Or I only have to wait finishing update operation?I haven’t done anything with PHP for more than 10 years now, but maybeyou need to use parallel or pthreads and do the work via multiplethreads. Are you already working with several BaseX client instances?ChristianOn Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Thank you. 29.01.2020, 12:02, "first name last name" <randomcod...@gmail.com>: But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server [2] http://docs.basex.org/wiki/DBA On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcod...@gmail.com> wrote: "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, everybody! I use basex+php. When I call db:optimize('A') from basex gui I can read from db 'B'. But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. Why? And how can I solve it? I wracked my brain... -- С уважением, Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович--С уважением, Ветошкин Владимир Владимирович--С уважением, Ветошкин Владимир Владимирович--С уважением, Ветошкин Владимир Владимирович

Re: [basex-talk] db:optimize

2020-01-29 Thread Ветошкин Владимир
Yes, I have seen that wiki pages...What kind of conflicts?Do you mean "or may even lead to corrupt databases." ?Now I only get error when I read updating database like "database is updating..."29.01.2020, 21:11, "Christian Grün" :> As I can see, it solves my problems. Am I right doing so?The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"?Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05:Hi, Christian! I hope you're well.No, there is only one client at this time.Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize...").And while it was working I can read from other databases like a charm! :)As I can see, it solves my problems. Am I right doing so?29.01.2020, 20:28, "Christian Grün" <christian.gr...@gmail.com>:Hi Владимир, But I want non-blocking read/write operations (in different databases) with php. Is it possible? Or I only have to wait finishing update operation?I haven’t done anything with PHP for more than 10 years now, but maybeyou need to use parallel or pthreads and do the work via multiplethreads. Are you already working with several BaseX client instances?ChristianOn Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Thank you. 29.01.2020, 12:02, "first name last name" <randomcod...@gmail.com>: But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server [2] http://docs.basex.org/wiki/DBA On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcod...@gmail.com> wrote: "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, everybody! I use basex+php. When I call db:optimize('A') from basex gui I can read from db 'B'. But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. Why? And how can I solve it? I wracked my brain... -- С уважением, Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович--С уважением, Ветошкин Владимир Владимирович--С уважением, Ветошкин Владимир Владимирович

Re: [basex-talk] db:optimize

2020-01-30 Thread Ветошкин Владимир
Hmm..If I run [basex -q"db:optimize('A')"], I can read from db 'B'.But if I run [basexclient -Uadmin -Padmin -q"db:optimize('A')"], I can't read from db 'B'. 29.01.2020, 21:48, "Ветошкин Владимир" :Yes, the system works on php and I can call basex only via php client of basex or exec function.Now all functions work via php client of basex.If I additionally will use exec with basexclient - it won't corrupt databases? 29.01.2020, 21:27, "Christian Grün" <christian.gr...@gmail.com>:In the worst case, yes. If you prefer to call basex via php and exec, invoke basexclient instead of basex: http://docs.basex.org/wiki/Database_Server Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:23:Yes, I have seen that wiki pages...What kind of conflicts?Do you mean "or may even lead to corrupt databases." ?Now I only get error when I read updating database like "database is updating..." 29.01.2020, 21:11, "Christian Grün" <christian.gr...@gmail.com>:> As I can see, it solves my problems. Am I right doing so? The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"?  Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05:Hi, Christian! I hope you're well.No, there is only one client at this time. Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize...").And while it was working I can read from other databases like a charm! :) As I can see, it solves my problems. Am I right doing so? 29.01.2020, 20:28, "Christian Grün" <christian.gr...@gmail.com>:Hi Владимир,  But I want non-blocking read/write operations (in different databases) with php. Is it possible? Or I only have to wait finishing update operation?I haven’t done anything with PHP for more than 10 years now, but maybeyou need to use parallel or pthreads and do the work via multiplethreads. Are you already working with several BaseX client instances?ChristianOn Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Thank you. 29.01.2020, 12:02, "first name last name" <randomcod...@gmail.com>: But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server [2] http://docs.basex.org/wiki/DBA On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcod...@gmail.com> wrote: "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, everybody! I use basex+php. When I call db:optimize('A') from basex gui I can read from db 'B'. But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. Why? And how can I solve it? I wracked my brain... -- С уважением, Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович   --С уважением,Ветошкин Владимир Владимирович   --С уважением,Ветошкин Владимир Владимирович   --С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] db:optimize

2020-01-30 Thread Ветошкин Владимир
From php I call:exec("\"/path/to/java/java.exe\" -cp \"/path/to/basex/BaseX.jar;/path/to/basex/lib/custom/*;/path/to/basex/lib/*\" -Xmx1200m org.basex.BaseXClient -Uadmin -Padmin -q\"db:optimize('000999~201807',true(), map { 'language':'Russian', 'ftindex': true(), 'textindex': true(), 'attrindex': true(), 'tokenindex': true() })\""); And then from php I execute:$session = new Session("127.0.0.1", $this->dbport, $dblogin, $dbpass);$input = "db:open('~users')/users/user";$query = $session->query($input);while ($query->more()) {$data = "">}$query->close();$session->close(); The second code starts only after the first finished. If in the first code I use "org.basex.BaseX" instead of "org.basex.BaseXClient" - the second code starts immediately.  30.01.2020, 11:05, "Christian Grün" :Please provide us with a self-contained test case.Thanks in advance   Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Do., 30. Jan. 2020, 09:01:Hmm..If I run [basex -q"db:optimize('A')"], I can read from db 'B'.But if I run [basexclient -Uadmin -Padmin -q"db:optimize('A')"], I can't read from db 'B'. 29.01.2020, 21:48, "Ветошкин Владимир" <en-tra...@yandex.ru>:Yes, the system works on php and I can call basex only via php client of basex or exec function.Now all functions work via php client of basex.If I additionally will use exec with basexclient - it won't corrupt databases? 29.01.2020, 21:27, "Christian Grün" <christian.gr...@gmail.com>:In the worst case, yes. If you prefer to call basex via php and exec, invoke basexclient instead of basex: http://docs.basex.org/wiki/Database_Server Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:23:Yes, I have seen that wiki pages...What kind of conflicts?Do you mean "or may even lead to corrupt databases." ?Now I only get error when I read updating database like "database is updating..." 29.01.2020, 21:11, "Christian Grün" <christian.gr...@gmail.com>:> As I can see, it solves my problems. Am I right doing so? The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"?  Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05:Hi, Christian! I hope you're well.No, there is only one client at this time. Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize...").And while it was working I can read from other databases like a charm! :) As I can see, it solves my problems. Am I right doing so? 29.01.2020, 20:28, "Christian Grün" <christian.gr...@gmail.com>:Hi Владимир,  But I want non-blocking read/write operations (in different databases) with php. Is it possible? Or I only have to wait finishing update operation?I haven’t done anything with PHP for more than 10 years now, but maybeyou need to use parallel or pthreads and do the work via multiplethreads. Are you already working with several BaseX client instances?ChristianOn Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Thank you. 29.01.2020, 12:02, "first name last name" <randomcod...@gmail.com>: But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server [2] http://docs.basex.org/wiki/DBA On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcod...@gmail.com> wrote: "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, everybody! I use basex+php. When I call db:optimize('A') from basex gui I can read from db 'B'. But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. Why? And how can I solve it? I wracked my brain... -- С уважением, Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович   --С уважением,Ветошкин Владимир Владимирович   --С уважением,Ветошкин Владимир Владимирович   --С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] db:optimize

2020-01-30 Thread Ветошкин Владимир
I suppose, there is something interesting in the core of website.If I isolate two php functions (one only update, one only read) - everything is ok.But If I update and read from the core of website - reading function waits finishing updating function.  30.01.2020, 11:17, "Ветошкин Владимир" :From php I call:exec("\"/path/to/java/java.exe\" -cp \"/path/to/basex/BaseX.jar;/path/to/basex/lib/custom/*;/path/to/basex/lib/*\" -Xmx1200m org.basex.BaseXClient -Uadmin -Padmin -q\"db:optimize('000999~201807',true(), map { 'language':'Russian', 'ftindex': true(), 'textindex': true(), 'attrindex': true(), 'tokenindex': true() })\""); And then from php I execute:$session = new Session("127.0.0.1", $this->dbport, $dblogin, $dbpass);$input = "db:open('~users')/users/user";$query = $session->query($input);while ($query->more()) {$data = "">}$query->close();$session->close(); The second code starts only after the first finished. If in the first code I use "org.basex.BaseX" instead of "org.basex.BaseXClient" - the second code starts immediately.  30.01.2020, 11:05, "Christian Grün" <christian.gr...@gmail.com>:Please provide us with a self-contained test case.Thanks in advance   Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Do., 30. Jan. 2020, 09:01:Hmm..If I run [basex -q"db:optimize('A')"], I can read from db 'B'.But if I run [basexclient -Uadmin -Padmin -q"db:optimize('A')"], I can't read from db 'B'. 29.01.2020, 21:48, "Ветошкин Владимир" <en-tra...@yandex.ru>:Yes, the system works on php and I can call basex only via php client of basex or exec function.Now all functions work via php client of basex.If I additionally will use exec with basexclient - it won't corrupt databases? 29.01.2020, 21:27, "Christian Grün" <christian.gr...@gmail.com>:In the worst case, yes. If you prefer to call basex via php and exec, invoke basexclient instead of basex: http://docs.basex.org/wiki/Database_Server Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:23:Yes, I have seen that wiki pages...What kind of conflicts?Do you mean "or may even lead to corrupt databases." ?Now I only get error when I read updating database like "database is updating..." 29.01.2020, 21:11, "Christian Grün" <christian.gr...@gmail.com>:> As I can see, it solves my problems. Am I right doing so? The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"?  Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05:Hi, Christian! I hope you're well.No, there is only one client at this time. Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize...").And while it was working I can read from other databases like a charm! :) As I can see, it solves my problems. Am I right doing so? 29.01.2020, 20:28, "Christian Grün" <christian.gr...@gmail.com>:Hi Владимир,  But I want non-blocking read/write operations (in different databases) with php. Is it possible? Or I only have to wait finishing update operation?I haven’t done anything with PHP for more than 10 years now, but maybeyou need to use parallel or pthreads and do the work via multiplethreads. Are you already working with several BaseX client instances?ChristianOn Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Thank you. 29.01.2020, 12:02, "first name last name" <randomcod...@gmail.com>: But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server [2] http://docs.basex.org/wiki/DBA On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcod...@gmail.com> wrote: "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, everybody! I use basex+php. When I call db:optimize('A') from basex gui I can read from db 'B'. But if I call db:optimiz

Re: [basex-talk] db:optimize

2020-01-30 Thread Ветошкин Владимир
I have found a reason.There was a query with non-static database names and because of that global lock.Thank you for your help! 30.01.2020, 12:10, "Ветошкин Владимир" :I suppose, there is something interesting in the core of website.If I isolate two php functions (one only update, one only read) - everything is ok.But If I update and read from the core of website - reading function waits finishing updating function.  30.01.2020, 11:17, "Ветошкин Владимир" <en-tra...@yandex.ru>:From php I call:exec("\"/path/to/java/java.exe\" -cp \"/path/to/basex/BaseX.jar;/path/to/basex/lib/custom/*;/path/to/basex/lib/*\" -Xmx1200m org.basex.BaseXClient -Uadmin -Padmin -q\"db:optimize('000999~201807',true(), map { 'language':'Russian', 'ftindex': true(), 'textindex': true(), 'attrindex': true(), 'tokenindex': true() })\""); And then from php I execute:$session = new Session("127.0.0.1", $this->dbport, $dblogin, $dbpass);$input = "db:open('~users')/users/user";$query = $session->query($input);while ($query->more()) {$data = "">}$query->close();$session->close(); The second code starts only after the first finished. If in the first code I use "org.basex.BaseX" instead of "org.basex.BaseXClient" - the second code starts immediately.  30.01.2020, 11:05, "Christian Grün" <christian.gr...@gmail.com>:Please provide us with a self-contained test case.Thanks in advance   Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Do., 30. Jan. 2020, 09:01:Hmm..If I run [basex -q"db:optimize('A')"], I can read from db 'B'.But if I run [basexclient -Uadmin -Padmin -q"db:optimize('A')"], I can't read from db 'B'. 29.01.2020, 21:48, "Ветошкин Владимир" <en-tra...@yandex.ru>:Yes, the system works on php and I can call basex only via php client of basex or exec function.Now all functions work via php client of basex.If I additionally will use exec with basexclient - it won't corrupt databases? 29.01.2020, 21:27, "Christian Grün" <christian.gr...@gmail.com>:In the worst case, yes. If you prefer to call basex via php and exec, invoke basexclient instead of basex: http://docs.basex.org/wiki/Database_Server Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:23:Yes, I have seen that wiki pages...What kind of conflicts?Do you mean "or may even lead to corrupt databases." ?Now I only get error when I read updating database like "database is updating..." 29.01.2020, 21:11, "Christian Grün" <christian.gr...@gmail.com>:> As I can see, it solves my problems. Am I right doing so? The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"?  Ветошкин Владимир <en-tra...@yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05:Hi, Christian! I hope you're well.No, there is only one client at this time. Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize...").And while it was working I can read from other databases like a charm! :) As I can see, it solves my problems. Am I right doing so? 29.01.2020, 20:28, "Christian Grün" <christian.gr...@gmail.com>:Hi Владимир,  But I want non-blocking read/write operations (in different databases) with php. Is it possible? Or I only have to wait finishing update operation?I haven’t done anything with PHP for more than 10 years now, but maybeyou need to use parallel or pthreads and do the work via multiplethreads. Are you already working with several BaseX client instances?ChristianOn Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Thank you. 29.01.2020, 12:02, "first name last name" <randomcod...@gmail.com>: But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server [2] http://docs.basex.org/wiki/DBA On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcod...@gmail.com> wrote: "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations On Wed, Jan 29, 2020 a

[basex-talk] jobs

2020-02-27 Thread Ветошкин Владимир
Hi! Is it possible to add a job under specified user or only admin?I have a base with accessing only for userA. And I want to add a job with queries to that base under userA.  -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] jobs

2020-02-27 Thread Ветошкин Владимир
I solved it by the function "client:connect"Is it right? 27.02.2020, 13:26, "Ветошкин Владимир" :Hi! Is it possible to add a job under specified user or only admin?I have a base with accessing only for userA. And I want to add a job with queries to that base under userA.  -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] jobs

2020-02-27 Thread Ветошкин Владимир
Hi, Christian!Thank you.27.02.2020, 18:35, "Christian Grün" :Hi Vladimir, Is it possible to add a job under specified user or only admin?Only admin users can call jobs:eval(), and the resulting job will haveadmin permissions as well. I solved it by the function "client:connect" Is it right?Yes; this function allows you to connect to a BaseX server from XQuerywith users other than admins. You should address another instance ofBaseX than the one you’re currently residinig in; otherwise you maycreate deadlocks (as described in the documentation of the module).You can also use xquery:eval to run some code with restrictedpermissions (but the query won’t be evaluated as independent job).Hope this helps,Christian 27.02.2020, 13:26, "Ветошкин Владимир" <en-tra...@yandex.ru>: Hi! Is it possible to add a job under specified user or only admin? I have a base with accessing only for userA. And I want to add a job with queries to that base under userA. -- С уважением, Ветошкин Владимир Владимирович -- С уважением, Ветошкин Владимир Владимирович--С уважением, Ветошкин Владимир Владимирович

[basex-talk] txtl.basex

2020-05-19 Thread Ветошкин Владимир
Hi, basex team. The base has enabled attributes - updindex and autooptimize.Why value index files (txtl.basex) are very large after time? (643MB)db:optimize with true as the second parameter optimize the database to the size 32MB.(basex 9.1.2)


Re: [basex-talk] txtl.basex

2020-05-19 Thread Ветошкин Владимир
Christian, thank you!I didn't think both parameters cannot be true.19.05.2020, 19:28, "Christian Grün" :Hi Vladimir,If autooptimize is enabled, there is no need to enable updindex. Ifyou only enable updindex, it’s expected behavior that your index fileswill grow, and it’s recommended to optimize your database in regularintervals.BestChristianOn Tue, May 19, 2020 at 1:30 PM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, basex team. The base has enabled attributes - updindex and autooptimize. Why value index files (txtl.basex) are very large after time? (643MB) db:optimize with true as the second parameter optimize the database to the size 32MB. (basex 9.1.2)

[basex-talk] patterns

2020-05-21 Thread Ветошкин Владимир
Hi, basex team! How can I use regex in patterns? Or that's impossible?For example,user:grant('000590',('write'),('000590-\d{2,3}_settings'))Or only so:user:grant('000590',('write'),('000590-*_settings'))


Re: [basex-talk] patterns

2020-05-21 Thread Ветошкин Владимир
Hi, Кристиан,Ok. Thank you for another way.I decided to leave "user:grant('000590',('write'),('000590-*_settings'))"There will be no overlap in database names.  21.05.2020, 16:59, "Christian Grün" :Hi Владимир,Database patterns are restricted to the glob syntax (see [1]). You cancreate multiple patterns…  for $n in 10 to 999  return user:grant('000590', 'write', '000590-' || $n || '_settings')…but you should do some performance tests before going live with that.Best,Кристиан[1] https://docs.basex.org/wiki/Commands#Glob_SyntaxOn Thu, May 21, 2020 at 3:32 PM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi, basex team! How can I use regex in patterns? Or that's impossible? For example, user:grant('000590',('write'),('000590-\d{2,3}_settings')) Or only so: user:grant('000590',('write'),('000590-*_settings'))

Re: [basex-talk] BaseX 10.0 as a SOAP client

2022-08-11 Thread Ветошкин Владимир
Если нет вариантов составного ключевого поля, то пусть будет id.11.08.2022, 23:10, "ykhab...@bellsouth.net" :Hello,I need to call SOAP Web Service based on its URL and WSDL.The Web Service is password protected, and returns back XML.WSDL shows all operations, aka methods.Is it possible to make calls to SOAP Web Service from the BaseX 10.0?Regards,Yitzhak Khabinsky-- С уважением, Ветошкин Владимир Владимирович


Re: [basex-talk] BaseX 10.0 as a SOAP client

2022-08-11 Thread Ветошкин Владимир
Oh, sorry for wrong reply.12.08.2022, 07:55, "Ветошкин Владимир" :Если нет вариантов составного ключевого поля, то пусть будет id.11.08.2022, 23:10, "ykhab...@bellsouth.net" <ykhab...@bellsouth.net>:Hello,I need to call SOAP Web Service based on its URL and WSDL.The Web Service is password protected, and returns back XML.WSDL shows all operations, aka methods.Is it possible to make calls to SOAP Web Service from the BaseX 10.0?Regards,Yitzhak Khabinsky-- С уважением, Ветошкин Владимир Владимирович
-- С уважением, Ветошкин Владимир Владимирович

[basex-talk] db:lock

2022-12-29 Thread Ветошкин Владимир
Hello everyone I have an error "[db:lock] Database 'db' cannot be updated, it is opened by another process".While client's "reading" query from 'db' in progress, I query "db:alter('newdb','db')" for the same database.How can I wait for ending client's query and then "db:alter('newdb','db')"? Thanks for your help! -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] db:lock

2022-12-29 Thread Ветошкин Владимир
Hi, Yes, it's opened by client's query first. While that query is in progress, I query "db:alter" for the same database.How can I query "db:alter" after first query ends? Thank you 30.12.2022, 10:28, "DK Singh" :Hi,It seems that might be your DB is opened or your DB has Benn crashed Thanks  On Fri, 30 Dec, 2022, 12:50 pm Ветошкин Владимир, <en-tra...@yandex.ru> wrote:Hello everyone I have an error "[db:lock] Database 'db' cannot be updated, it is opened by another process".While client's "reading" query from 'db' in progress, I query "db:alter('newdb','db')" for the same database.How can I wait for ending client's query and then "db:alter('newdb','db')"? Thanks for your help! -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] db:lock

2022-12-30 Thread Ветошкин Владимир
Hi, Yes, I know. But reading operation began executing first and not ended when the second query (db:alter) begins. 30.12.2022, 10:58, "DK Singh" :Hi If any update operation is going on by others query then you won't be able to read the DB Please see Basex transaction Management Thanks  On Fri, 30 Dec, 2022, 1:03 pm Ветошкин Владимир, <en-tra...@yandex.ru> wrote:Hi, Yes, it's opened by client's query first. While that query is in progress, I query "db:alter" for the same database.How can I query "db:alter" after first query ends? Thank you 30.12.2022, 10:28, "DK Singh" <dharam.m...@gmail.com>:Hi,It seems that might be your DB is opened or your DB has Benn crashed Thanks  On Fri, 30 Dec, 2022, 12:50 pm Ветошкин Владимир, <en-tra...@yandex.ru> wrote:Hello everyone I have an error "[db:lock] Database 'db' cannot be updated, it is opened by another process".While client's "reading" query from 'db' in progress, I query "db:alter('newdb','db')" for the same database.How can I wait for ending client's query and then "db:alter('newdb','db')"? Thanks for your help! -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] db:lock

2022-12-30 Thread Ветошкин Владимир
I don't know why, but can't repeat it locally.First I query heavy reading operation on 'db', then I alter('dbcopy', 'db') and the second query waits ending the first. Why on the server the similar queries executed with errors, hmm. 30.12.2022, 11:08, "Ветошкин Владимир" :Hi, Yes, I know. But reading operation began executing first and not ended when the second query (db:alter) begins. 30.12.2022, 10:58, "DK Singh" <dharam.m...@gmail.com>:Hi If any update operation is going on by others query then you won't be able to read the DB Please see Basex transaction Management Thanks  On Fri, 30 Dec, 2022, 1:03 pm Ветошкин Владимир, <en-tra...@yandex.ru> wrote:Hi, Yes, it's opened by client's query first. While that query is in progress, I query "db:alter" for the same database.How can I query "db:alter" after first query ends? Thank you 30.12.2022, 10:28, "DK Singh" <dharam.m...@gmail.com>:Hi,It seems that might be your DB is opened or your DB has Benn crashed Thanks  On Fri, 30 Dec, 2022, 12:50 pm Ветошкин Владимир, <en-tra...@yandex.ru> wrote:Hello everyone I have an error "[db:lock] Database 'db' cannot be updated, it is opened by another process".While client's "reading" query from 'db' in progress, I query "db:alter('newdb','db')" for the same database.How can I wait for ending client's query and then "db:alter('newdb','db')"? Thanks for your help! -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] db:lock

2022-12-30 Thread Ветошкин Владимир
Perhaps, there was a one-time failure. 30.12.2022, 11:30, "Ветошкин Владимир" :I don't know why, but can't repeat it locally.First I query heavy reading operation on 'db', then I alter('dbcopy', 'db') and the second query waits ending the first. Why on the server the similar queries executed with errors, hmm. 30.12.2022, 11:08, "Ветошкин Владимир" <en-tra...@yandex.ru>:Hi, Yes, I know. But reading operation began executing first and not ended when the second query (db:alter) begins. 30.12.2022, 10:58, "DK Singh" <dharam.m...@gmail.com>:Hi If any update operation is going on by others query then you won't be able to read the DB Please see Basex transaction Management Thanks  On Fri, 30 Dec, 2022, 1:03 pm Ветошкин Владимир, <en-tra...@yandex.ru> wrote:Hi, Yes, it's opened by client's query first. While that query is in progress, I query "db:alter" for the same database.How can I query "db:alter" after first query ends? Thank you 30.12.2022, 10:28, "DK Singh" <dharam.m...@gmail.com>:Hi,It seems that might be your DB is opened or your DB has Benn crashed Thanks  On Fri, 30 Dec, 2022, 12:50 pm Ветошкин Владимир, <en-tra...@yandex.ru> wrote:Hello everyone I have an error "[db:lock] Database 'db' cannot be updated, it is opened by another process".While client's "reading" query from 'db' in progress, I query "db:alter('newdb','db')" for the same database.How can I wait for ending client's query and then "db:alter('newdb','db')"? Thanks for your help! -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

[basex-talk] db:copy

2023-11-16 Thread Ветошкин Владимир
 Hi everyone. Since I have changed jdk version to 12 (azul) - I get error, when I copy database (db:copy).It's only in basexserver. When I run basex - everything is ok. Error:Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 9.1.2 Java: Azul Systems, Inc., 12.0.2 OS: Linux, amd64 Stack Trace: java.lang.NoClassDefFoundError: Could not initialize class sun.nio.fs.UnixCopyFile at java.base/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:258) at java.base/java.nio.file.Files.copy(Files.java:1297) at org.basex.io.IOFile.copyTo(IOFile.java:319) at org.basex.core.cmd.Copy.copy(Copy.java:83) at org.basex.query.up.primitives.name.DBCopy.apply(DBCopy.java:43) at org.basex.query.up.NameUpdates.apply(NameUpdates.java:58) at org.basex.query.up.ContextModifier.apply(ContextModifier.java:132) at org.basex.query.up.Updates.apply(Updates.java:156) at org.basex.query.QueryContext.iter(QueryContext.java:351) at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90) at org.basex.core.cmd.AQuery.query(AQuery.java:109) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.server.ClientListener.run(ClientListener.java:140)-- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] db:copy

2023-11-16 Thread Ветошкин Владимир
Hi, Christian. I can't check it now. Maybe later.I confuse with the fact, that basexserver failes, but basex did not.Are they use different methods to copy databases? Or that jdk bug only? 16.11.2023, 15:00, "Christian Grün" :Hi, this definitely looks like a bug in the JDK context. What happens if you upgrade your JDK to a newer version?Best, Christian  On Thu, Nov 16, 2023 at 12:56 PM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi everyone. Since I have changed jdk version to 12 (azul) - I get error, when I copy database (db:copy).It's only in basexserver. When I run basex - everything is ok. Error:Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 9.1.2 Java: Azul Systems, Inc., 12.0.2 OS: Linux, amd64 Stack Trace: java.lang.NoClassDefFoundError: Could not initialize class sun.nio.fs.UnixCopyFile at java.base/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:258) at java.base/java.nio.file.Files.copy(Files.java:1297) at org.basex.io.IOFile.copyTo(IOFile.java:319) at org.basex.core.cmd.Copy.copy(Copy.java:83) at org.basex.query.up.primitives.name.DBCopy.apply(DBCopy.java:43) at org.basex.query.up.NameUpdates.apply(NameUpdates.java:58) at org.basex.query.up.ContextModifier.apply(ContextModifier.java:132) at org.basex.query.up.Updates.apply(Updates.java:156) at org.basex.query.QueryContext.iter(QueryContext.java:351) at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90) at org.basex.core.cmd.AQuery.query(AQuery.java:109) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.server.ClientListener.run(ClientListener.java:140)-- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] db:copy

2023-11-16 Thread Ветошкин Владимир
Yes, Result of the server instance:java.vm.compressedOopsMode: 32-bit java.vm.info: mixed mode, sharing java.vm.name: OpenJDK 64-Bit Server VM java.vm.specification.name: Java Virtual Machine Specification java.vm.specification.vendor: Oracle Corporation java.vm.specification.version: 12 java.vm.vendor: Azul Systems, Inc. java.vm.version: 12.0.2+3 Result of the standalone instance:java.vm.compressedOopsMode: 32-bitjava.vm.info: mixed mode, sharingjava.vm.name: OpenJDK 64-Bit Server VMjava.vm.specification.name: Java Virtual Machine Specificationjava.vm.specification.vendor: Oracle Corporationjava.vm.specification.version: 12java.vm.vendor: Azul Systems, Inc.java.vm.version: 12.0.2+3   16.11.2023, 15:40, "Christian Grün" :Are they use different methods to copy databases? Or that jdk bug only? It’s exactly the same; when db:copy is called, the function isn’t aware of whether it has been called by a server or standalone/client instance. Are you sure that both the server and the standalone version of BaseX use the same JRE? You can e.g. check this with the following query: for $p in proc:property-names()[starts-with(., 'java.vm.')]return $p || ': ' || proc:property($p)16.11.2023, 15:00, "Christian Grün" <christian.gr...@gmail.com>:Hi, this definitely looks like a bug in the JDK context. What happens if you upgrade your JDK to a newer version?Best, Christian  On Thu, Nov 16, 2023 at 12:56 PM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi everyone. Since I have changed jdk version to 12 (azul) - I get error, when I copy database (db:copy).It's only in basexserver. When I run basex - everything is ok. Error:Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 9.1.2 Java: Azul Systems, Inc., 12.0.2 OS: Linux, amd64 Stack Trace: java.lang.NoClassDefFoundError: Could not initialize class sun.nio.fs.UnixCopyFile at java.base/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:258) at java.base/java.nio.file.Files.copy(Files.java:1297) at org.basex.io.IOFile.copyTo(IOFile.java:319) at org.basex.core.cmd.Copy.copy(Copy.java:83) at org.basex.query.up.primitives.name.DBCopy.apply(DBCopy.java:43) at org.basex.query.up.NameUpdates.apply(NameUpdates.java:58) at org.basex.query.up.ContextModifier.apply(ContextModifier.java:132) at org.basex.query.up.Updates.apply(Updates.java:156) at org.basex.query.QueryContext.iter(QueryContext.java:351) at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90) at org.basex.core.cmd.AQuery.query(AQuery.java:109) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.server.ClientListener.run(ClientListener.java:140)-- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

Re: [basex-talk] db:copy

2023-11-21 Thread Ветошкин Владимир
Hi, I have upgraded java version to 21. The problem is gone.Thank you. 16.11.2023, 15:49, "Ветошкин Владимир" :Yes, Result of the server instance:java.vm.compressedOopsMode: 32-bit java.vm.info: mixed mode, sharing java.vm.name: OpenJDK 64-Bit Server VM java.vm.specification.name: Java Virtual Machine Specification java.vm.specification.vendor: Oracle Corporation java.vm.specification.version: 12 java.vm.vendor: Azul Systems, Inc. java.vm.version: 12.0.2+3 Result of the standalone instance:java.vm.compressedOopsMode: 32-bitjava.vm.info: mixed mode, sharingjava.vm.name: OpenJDK 64-Bit Server VMjava.vm.specification.name: Java Virtual Machine Specificationjava.vm.specification.vendor: Oracle Corporationjava.vm.specification.version: 12java.vm.vendor: Azul Systems, Inc.java.vm.version: 12.0.2+3   16.11.2023, 15:40, "Christian Grün" <christian.gr...@gmail.com>:Are they use different methods to copy databases? Or that jdk bug only? It’s exactly the same; when db:copy is called, the function isn’t aware of whether it has been called by a server or standalone/client instance. Are you sure that both the server and the standalone version of BaseX use the same JRE? You can e.g. check this with the following query: for $p in proc:property-names()[starts-with(., 'java.vm.')]return $p || ': ' || proc:property($p)16.11.2023, 15:00, "Christian Grün" <christian.gr...@gmail.com>:Hi, this definitely looks like a bug in the JDK context. What happens if you upgrade your JDK to a newer version?Best, Christian  On Thu, Nov 16, 2023 at 12:56 PM Ветошкин Владимир <en-tra...@yandex.ru> wrote: Hi everyone. Since I have changed jdk version to 12 (azul) - I get error, when I copy database (db:copy).It's only in basexserver. When I run basex - everything is ok. Error:Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 9.1.2 Java: Azul Systems, Inc., 12.0.2 OS: Linux, amd64 Stack Trace: java.lang.NoClassDefFoundError: Could not initialize class sun.nio.fs.UnixCopyFile at java.base/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:258) at java.base/java.nio.file.Files.copy(Files.java:1297) at org.basex.io.IOFile.copyTo(IOFile.java:319) at org.basex.core.cmd.Copy.copy(Copy.java:83) at org.basex.query.up.primitives.name.DBCopy.apply(DBCopy.java:43) at org.basex.query.up.NameUpdates.apply(NameUpdates.java:58) at org.basex.query.up.ContextModifier.apply(ContextModifier.java:132) at org.basex.query.up.Updates.apply(Updates.java:156) at org.basex.query.QueryContext.iter(QueryContext.java:351) at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90) at org.basex.core.cmd.AQuery.query(AQuery.java:109) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.server.ClientListener.run(ClientListener.java:140)-- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович   -- С уважением,Ветошкин Владимир Владимирович 

[basex-talk] Single command expected

2024-04-05 Thread Ветошкин Владимир
Hi, How can I kill session and then user:grant or user:drop permissions in a single command?When I make it in two different commands - user logins between them and the second command gets error, that the user is currently logged in. -- С уважением,Ветошкин Владимир Владимирович 


Re: [basex-talk] Single command expected

2024-04-08 Thread Ветошкин Владимир
Hi, Christian, Thank you for your answer.I don't need to drop the user, but only user permissions.For now I have made the authorization deny function before user:kill. Then I change need user params, and then the authorization allow function is called.Hope this helps. 08.04.2024, 12:12, "Christian Grün" :Hi Vladimir, There’s currently no such function available. Even if we had a user:kill function, we could not ensure that a user logs in a millisecond later when user:drop is going to be executed. We could enrich user:drop et al. with an “enforce” option to kill users, but the challenge is that a user may currently execute a long-running update query that needs to be finalized before the user can be dropped, thus delaying the execution of the user:drop operation and possible other subsequent requests. Have you already observed the presented pattern? Best,Christian  On Fri, Apr 5, 2024 at 10:36 AM Ветошкин Владимир <en-tra...@yandex.ru> wrote:Hi, How can I kill session and then user:grant or user:drop permissions in a single command?When I make it in two different commands - user logins between them and the second command gets error, that the user is currently logged in. -- С уважением,Ветошкин Владимир Владимирович-- С уважением,Ветошкин Владимир Владимирович