Hi Sebastian,

It’s difficult to guess what the query optimizer does by just looking at
the query. Could you pass us on a database document that allows us to run
the query?

Any attempt to simplify your query is appreciated. Here are some more
things that you could try:
• Does it make a difference if you work with namespaces, or could all
prefixes in the location steps be replaced with *?
• Does the issue only occur if your code is defined in the local:search
function?
• What happens if you replace the functx function call with its body
($value = $seq)?

Best,
Christian



On Mon, Nov 12, 2018 at 9:54 AM Sebastian Zimmer <
sebastian.zim...@uni-koeln.de> wrote:

> Hi,
>
> I'm working on a query where the full-text index is not applied, even
> though it could be (see attached test.xql).
>
> I'm sorry for the somewhat complicated look of the example with
> data-specific XPaths and so on. I really have tried to simplify it as much
> as I could, but when I further simplify it, the fulltext index actually
> will be applied or the query is optimized to () due to cached evaluations.
>
> But if you take the expression of the variable $number and inline it into
> below where the variable is referenced, you may see what I mean. The result
> is an equivalent query (see attached test-ft.xql) to the original one, but
> now the fulltext index *is* applied.
>
> I'm using the BaseX 9.1 snapshot from 2018-11-05.
>
> Best,
> Sebastian
> --
> Sebastian Zimmer
> sebastian.zim...@uni-koeln.de
> [image: CCeH Logo] <http://cceh.uni-koeln.de>
>
> Cologne Center for eHumanities <http://cceh.uni-koeln.de>
> DH Center at the University of Cologne
> [image: Twitter Logo] <https://twitter.com/CCeHum>@CCeHum
> <https://twitter.com/CCeHum>
>

Reply via email to