-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/static filter for the TREE specification #86
base: master
Are you sure you want to change the base?
Feature/static filter for the TREE specification #86
Conversation
…nction are defined.
…commited last time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things are still very vague to me as to how everything works.
I think adding some more documentation would help a lot.
Also, I'm not convinced yet about the optimize-link-traversal bus, as it seems to be tailored specifically to tree, and is not link-traversal-wide.
Can we move this logic into the tree-specific actor on the link extraction bus?
If not, can we make this optimize bus independent of tree?
packages/actor-extract-links-extract-tree/lib/ActorExtractLinksTree.ts
Outdated
Show resolved
Hide resolved
...r-optimize-link-traversal-filter-tree-links/lib/ActorOptimizeLinkTraversalFilterTreeLinks.ts
Outdated
Show resolved
Hide resolved
packages/actor-extract-links-extract-tree/lib/treeMetadataExtraction.ts
Outdated
Show resolved
Hide resolved
packages/actor-extract-links-extract-tree/lib/treeMetadataExtraction.ts
Outdated
Show resolved
Hide resolved
...r-optimize-link-traversal-filter-tree-links/lib/ActorOptimizeLinkTraversalFilterTreeLinks.ts
Outdated
Show resolved
Hide resolved
...r-optimize-link-traversal-filter-tree-links/lib/ActorOptimizeLinkTraversalFilterTreeLinks.ts
Outdated
Show resolved
Hide resolved
...r-optimize-link-traversal-filter-tree-links/lib/ActorOptimizeLinkTraversalFilterTreeLinks.ts
Outdated
Show resolved
Hide resolved
…val with one value, now it is process as if it was a single value
…lee-implementation
2f6bcb6
to
6da1c4a
Compare
Static filter for the TREE specification
The objective of this PR is to implement SPARQL filters in a way that when the query contains a filter expression, the next nodes describe by the current TREE relation that cannot be satisfy with the filter will not be followed. The filters are called static because they are applied before the execution of the query, so the binding during execution has no impact on the pursuit of nodes.
Implementation
The TREE traversal extractor provided an
ITreeNode
object containing "all" the relevant metadata information.The FilterNode class provide to the solver the TREE relation, the filter expression and the effective variable. The solver than interpret the
TREE relation
and the filter expression as a boolean expression. The solution domain is after evaluating first for only the filter expression than with the filter expression and the TREE relation. If the domain is empty than a false value associated with the relation is inserted in a map in theFilterNode
class (as it is impossible that a document can match the filter will be found). The operation is repeated for all the relation and a map of those results are forwarded to the TREE extractor actor that prune the irrelevant links.Limitation
Perceptive
linked to #82