[bugfix] asterisk and dot in element()-typed args in field @expression#6461
Open
duncdrum wants to merge 3 commits into
Open
[bugfix] asterisk and dot in element()-typed args in field @expression#6461duncdrum wants to merge 3 commits into
duncdrum wants to merge 3 commits into
Conversation
line-o
approved these changes
Jun 10, 2026
Member
There was a problem hiding this comment.
I think that switching to operate on a contextNode (an instance of NodeProxy) from handing over a document and a nodeId is a good approach.
At least to me this simplifies the mental model I have to maintain as I can be sure that the only operations within those functions operate on the node rather than the document that the node is in.
The fixes in this PR are valuable and important.
Member
|
@duncdrum I don't know what a |
Member
|
|
Contributor
Author
|
|
Member
|
@duncdrum Could you fix the typos in the commit messages as well? |
build the NodeProxy once in LuceneIndexWorker.write(), where the PendingDoc qname is in scope to determine element vs. attribute, then pass it through build()/doBuild()/checkCondition() as the evaluation context. This removes DocumentImpl/NodeId/short from those signatures and makes the abstraction explicit: callers supply the context node, field configs evaluate against it. close eXist-db#6446
`isValid = false` in `doBuild()` and `checkCondition()` silently kill a field for all subsequent documents when one document's expression evaluation failed. The flag belongs only in compile() — a runtime exception means this document failed, not that the expression is broken. compiled.reset() already restores clean state for the next call. Also nest compiled.reset() in try/finally so getContext().reset() always runs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
build the
NodeProxyonce inLuceneIndexWorker.write(), where the PendingDoc qname is in scope to determine element vs. attribute, then pass it throughbuild()/doBuild()/checkCondition()as the evaluation context. This removesDocumentImpl/NodeId/shortfrom those signatures andmakes the abstraction explicit: callers supply the context node, field configs evaluate against it.
close #6446