Dear list
We were wondering if BaseX always returns the results in the same order, even when using an XQUERY position(). In other words, if we only request the first 10 results as defined by position(), will this *always* be the same results, or is it possible that each time it will be ten different results? Or will caching and indexing alter the way in which results are returned first?
Thank you in advance
Bram Vanroy
Hi Bram,
Here is my experience : for what I saw in all our dictionnaries, the process order is always the same. I thought it was due to the ordered index structure.
If you look at http://temp.biblehistoriale.fr/rubrique/G/1 , you will see that order and results are always the same.
Code for extracting dictionary index is:
let $indice := (POST variable) for $i at $position in db:open($isi:bdd)/root/fiche [some $o in entry/form/orth satisfies matches($o,concat('^',$l),'i')] where $position gt xs:integer($indice) and $count lt xs:integer($indice) + 9 order by xs:dateTime($i/creationDate) descending return $i
So I think that means that position() is stable.
2017-06-24 14:09 GMT+02:00 Bram Vanroy bram.vanroy1@student.kuleuven.be:
Dear list
We were wondering if BaseX always returns the results in the same order, even when using an XQUERY position(). In other words, if we only request the first 10 results as defined by position(), will this **always** be the same results, or is it possible that each time it will be ten different results? Or will caching and indexing alter the way in which results are returned first?
Thank you in advance
Bram Vanroy
Sorry List, here is the right text è_è :
let $indice := (POST variable) let $l := (POST variable) for $i at $position in db:open($isi:bdd)/root/fiche [some $o in entry/form/orth satisfies matches($o,concat('^',$l),'i')] where $position gt xs:integer($indice) and $indice lt xs:integer($indice) + 9 order by xs:dateTime($i/creationDate) descending return $i --> index still the same
2017-06-24 16:03 GMT+02:00 Xavier-Laurent SALVADOR < xavierlaurent.salvador@gmail.com>:
Hi Bram,
Here is my experience : for what I saw in all our dictionnaries, the process order is always the same. I thought it was due to the ordered index structure.
If you look at http://temp.biblehistoriale.fr/rubrique/G/1 , you will see that order and results are always the same.
Code for extracting dictionary index is:
let $indice := (POST variable) for $i at $position in db:open($isi:bdd)/root/fiche [some $o in entry/form/orth satisfies matches($o,concat('^',$l),'i')] where $position gt xs:integer($indice) and $count lt xs:integer($indice) + 9 order by xs:dateTime($i/creationDate) descending return $i
So I think that means that position() is stable.
2017-06-24 14:09 GMT+02:00 Bram Vanroy bram.vanroy1@student.kuleuven.be:
Dear list
We were wondering if BaseX always returns the results in the same order, even when using an XQUERY position(). In other words, if we only request the first 10 results as defined by position(), will this **always** be the same results, or is it possible that each time it will be ten different results? Or will caching and indexing alter the way in which results are returned first?
Thank you in advance
Bram Vanroy
-- Ce message peut contenir des informations réservées exclusivement à son destinataire. Toute diffusion sans autorisation est interdite. Si vous n'en êtes pas le destinataire, merci de prendre contact avec l'expéditeur et de détruire ce message.
*This email may contain material for the sole use of the intended recipient. Any forwarding without express permission is prohibited. If you are not the intended recipient, please contact the sender and delete all copies*.
basex-talk@mailman.uni-konstanz.de