Why differentiate between root and sub-nodes?


(Calum Moore) #1

It’s interesting that the root has different syntax to a sub-node to perform the same functionality.

At Root:
me (func: allofterms(name, "jones indiana"))

Sub Node
me @filter(allofterms(name, "jones indiana"))

In both cases, this will filter nodes with name and return a list of matches.

Not sure if the underlying implementation is different between these two use cases, but from a user perspective they are performing a very similar thing.

Might be cleaner to just use the @filter or func: in both scenarios.


Filter Posting List by ID
(Manish R Jain) #2

To filter something, you need to start with a set of nodes. At root, you have to create a seed set of nodes, for us to perform any operations. A function can generate this set, following which you can then filter it.

Note that we don’t consider functions as only for filtering. They can be used at the root and other blocks.

This would start with an empty set, and then filter on a set. The result would still be an empty set.


(system) #3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.