Re: [basex-talk] Query optimizer bug with nested for? - java.lang.NullPointerException at Path.index(Path.java:673)

2020-05-11 Thread Sebastian Guerrero
Hi Christian! Wow, you are like a Terminator of coding! XD Is *BaseX933-20200511.231351.exe *( snapshot of 23:14 ) the latest version? I'm asking because I downloaded it and the error is still there, but now on line 671 instead of the original line 673. *Unexpected error: Improper use?

Re: [basex-talk] GUI "create db" file patterns are not sticky

2020-05-11 Thread Christian Grün
> ADDARCHIVES works, CHOP works, INTPARSE works, but CREATEFILTER does not, or > at least I still get only "*.xml" as a suffix in the "File Patterns" box. I found out why this doesn’t work: In the database creation dialog, CREATEFILTER depends on the input format (XML, JSON, etc.). It is always

Re: [basex-talk] Stack overflow with random-number-generator

2020-05-11 Thread Joe Wicentowski
I found a version that works. In the original version I must not have been using tail recursion correctly. Here is the version that works. Can anyone explain why the first version doesn't properly trigger tail recursion? ``` xquery version "3.1"; declare function

Re: [basex-talk] Query optimizer bug with nested for? - java.lang.NullPointerException at Path.index(Path.java:673)

2020-05-11 Thread Christian Grün
I’ll have a look at this tomorrow! Sebastian Guerrero schrieb am Mo., 11. Mai 2020, 21:47: > Hi Christian!, thanks for your reply :-) > > I've just downloaded the latest snapshot [1] and executed the query [2], > and yes: the problem is still there. > > Cheers, > Sebastian. > > [1]

Re: [basex-talk] repeatedly full-text marking the same text node

2020-05-11 Thread Christian Grün
> The thing that I would most want to see is some way to capture multi-word > matches using full-text search; "full phrase search", in effect. I can see > that as the start and end of a range of internal result positions but will > admit to wanting something less at risk of my arithmetic

Re: [basex-talk] repeatedly full-text marking the same text node

2020-05-11 Thread Liam R. E. Quin
On Mon, 2020-05-11 at 22:29 +0200, Christian Grün wrote: > Providing access to the starts and ends may be difficult due to all > the logical operators that can be used A way to go from ($input, $phrases) to a $input autmented with db:milestone elements each containing starts="0 7 23" ends="2 6

Re: [basex-talk] Query optimizer bug with nested for? - java.lang.NullPointerException at Path.index(Path.java:673)

2020-05-11 Thread Sebastian Guerrero
Yes!, you were right! I've bought a new 2TB M.2 disk to play with BaseX and I've got confused: instead of install in *A:* I installed the new snapshot on the old *C:* Now it works like a charm !! [1] Thank you very very much, Christian, by your time. Best regards! Sebastian. [1]

Re: [basex-talk] Query optimizer bug with nested for? - java.lang.NullPointerException at Path.index(Path.java:673)

2020-05-11 Thread Sebastian Guerrero
Hi Christian!, thanks for your reply :-) I've just downloaded the latest snapshot [1] and executed the query [2], and yes: the problem is still there. Cheers, Sebastian. [1] https://imgur.com/ahgMg7p [2] https://imgur.com/tDCAtCu On Mon, May 11, 2020 at 3:58 PM Christian Grün wrote: > Maybe

Re: [basex-talk] Query optimizer bug with nested for? - java.lang.NullPointerException at Path.index(Path.java:673)

2020-05-11 Thread Christian Grün
Buenas noticias: The bug is fixed. A new snapshot is waiting for you [1]. Cheers, Christian [1] http://files.basex.org/releases/latest/ On Mon, May 11, 2020 at 9:47 PM Sebastian Guerrero wrote: > > Hi Christian!, thanks for your reply :-) > > I've just downloaded the latest snapshot [1] and

Re: [basex-talk] Stack overflow with random-number-generator

2020-05-11 Thread Martin Honnen
On 11.05.2020 23:33, Joe Wicentowski wrote: I found a version that works.  In the original version I must not have been using tail recursion correctly.  Here is the version that works. Can anyone explain why the first version doesn't properly trigger tail recursion? No, but I think you can

Re: [basex-talk] Query optimizer bug with nested for? - java.lang.NullPointerException at Path.index(Path.java:673)

2020-05-11 Thread Christian Grün
> I'm asking because I downloaded it and the error is still there, but now on > line 671 instead of the original line 673. Hm, maybe it was the previous 9.3.3 snapshot you launched? Feel free to provide me with a minimized query that allows me to reproduce the bug if it persists. On GitHub, I

Re: [basex-talk] GUI "create db" file patterns are not sticky

2020-05-11 Thread Graydon
On Mon, May 11, 2020 at 10:49:10PM +0200, Christian Grün scripsit: > > ADDARCHIVES works, CHOP works, INTPARSE works, but CREATEFILTER does not, > > or at least I still get only "*.xml" as a suffix in the "File Patterns" box. > > I found out why this doesn’t work: In the database creation

Re: [basex-talk] Directory and files are neither a file or a directory on Basex 9.3.2 when read from Docker volume

2020-05-11 Thread Christian Grün
Hi France, Does your code work without Docker? > let $src-dir-items := file:list('ContentDBs') ... > let $debug := file:append('debug-a.xml', 'item: ' || $i || ' is dir: > ' || file:is-dir($i) || '') > let $debug := file:append('debug-a.xml', 'item: ' || $i || ' is file: > '

Re: [basex-talk] GUI "create db" file patterns are not sticky

2020-05-11 Thread Christian Grün
Hi Graydon, In the BaseX GUI dialog, some options are pure GUI options, and others, such as CREATEFILTER, are standard database options. The latter ones are discarded, as they would also affect other BaseX instances, such as the standalone mode. If you finish a GUI dialog operation, you can have

Re: [basex-talk] Performance loss between version 9.2.4 and 9.3.2 when executing specific xQuery

2020-05-11 Thread Christian Grün
Hi Michael, I checked your use case in greater depth, and I found the change in our code that caused the slowdown [1]. A) The nutshell answer : Just use the attached query! B) The extensive technical answer: • In previous versions of BaseX, most paths in FLWOR expressions were »inlined« in the

Re: [basex-talk] Performance loss between version 9.2.4 and 9.3.2 when executing specific xQuery

2020-05-11 Thread BIRKNER Michael
Hi Christian, thank you very much for looking into this and also for the query. I can confirm that by using your rewritten query the performance problem is gone! Also thank you for taking the time to explain the technical reasons! Best regards, Michael Mag. Michael Birkner AK Wien -

[basex-talk] I am confused how to specify multiple possible reponses in RestXQ with %rest:produces

2020-05-11 Thread Omar Siam
Hi, Today someone on the exist-open mailing list pointed out how they interpret %rest:produces: If your function produces more types of responses you specify all mime types just the same as with %rest:consumes: %rest:poroduces("application/xml", "application/json", ...) That is as a list of

Re: [basex-talk] repeatedly full-text marking the same text node

2020-05-11 Thread Christian Grün
Hi Graydon, Thanks for sharing your use case. > However, so far as I can tell, full text only works directly on a database > node. If I try to pass the node in a function, I get "No database node" > errors from attempting full-text operations. You can convert an XML node to the internal

Re: [basex-talk] GUI "create db" file patterns are not sticky

2020-05-11 Thread Graydon
On Mon, May 11, 2020 at 09:23:34AM +0200, Christian Grün scripsit: > Hi Graydon, Hi Christian -- [sensible reasons for why it does that snipped] > If you want to make database options persistent, you can manually add > them at the bottom of the .basex configuration file [1]. It’s > recommendable

Re: [basex-talk] repeatedly full-text marking the same text node

2020-05-11 Thread Graydon
On Mon, May 11, 2020 at 07:51:02PM +0200, Christian Grün scripsit: > Hi Graydon, Hi Christian -- > Thanks for sharing your use case. > > > However, so far as I can tell, full text only works directly on a database > > node. If I try to pass the node in a function, I get "No database node" >

[basex-talk] Query optimizer bug with nested for? - java.lang.NullPointerException at Path.index(Path.java:673)

2020-05-11 Thread Sebastian Guerrero
Hi everybody! Maybe it's a newbie issue, but I would like your comments. I'm writing a RESTXQ method to search among a couple of databases. ( >100 databases ) Some databases are split into a couple of parts due to the number of nodes. For example US: it's separated into US00, US01 and US02.

Re: [basex-talk] Query optimizer bug with nested for? - java.lang.NullPointerException at Path.index(Path.java:673)

2020-05-11 Thread Christian Grün
> > Maybe it's a newbie issue, but I would like your comments. > …definitely something you shouldn't encounter as a newbie either ;) Thanks for reporting it. Does the exception also occur with the latest snapshot [1]? Cheers Christian [1] http://files.basex.org/releases/latest/ > I'm