Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[fix?] Lucene index – make query-field only depend on the context sequence #1262
I've noticed that ft:query-field is not evaluated only once for the context sequence, but once for each item in the context sequence. For example, given an index named "testField" on the qname
<test> <p>Rüsselsheim</p> <p>Russelsheim</p> <p>Māori</p> <p>Maori</p> </test>
This code fixes the issue by making the function only depend on the context sequence. Please be aware that I don't think that I have completely understood the dependency stuff yet, but I am pretty certain that query-field will only ever depend on the context sequence, never on the context item. If this assumption is correct, the changes should be safe to merge. At least all lucene index tests still pass (at least those that are passing on the current develop – there are some failing xquery tests in there, maybe someone should have a look at those, too..).