⚡️ Ideas

Allow filtering based on existence / type / contents of child nodes

Explain the problem as you see it

I am unable to filter nodes based on the existence / type / contents of child nodes. The result is that I am unable to properly filter out information I do not need.

Why is this a problem for you?

I would like to search for meetings that contain notes. This could be done multiple ways depending on how meeting notes are taken:

  • Search for #meeting nodes that do not contain child nodes (fields excluded).
  • Search for #meeting nodes that contain a specific #supertag
  • Search for #meeting nodes that contain a node that is not DONE
  • Search for #meeting nodes that contain the string "Notes"

None of these searches are possible today. As a result, it is unnecessary time consuming for me find specific meeting notes because I am forced to navigate through all of my #meeting nodes.

Suggest a solution

Ideally, this functionality would be made available using a new node contents operator like CONTAINS or HAS CHILD which accepts nothing, a tag, a string, etc. as a parameter. The query only has to match a single item while should address performance concerns.

If the above solution is not possible, there are a few other approaches that could work:

  1. If on child created and on child removed events were available at the supertag level, a check could (presumably) be performed after each child was created/removed which could then set a field value for reference.
  2. The system could offer new node content operators for specific queries like HAS CHILDREN, HAS CHILD [TODO|DONE|NOT DONE], HAS CHILD TAG, etc.

This feels like basic functionality that I was surprised to find missing from Tana.

Thanks in advanced for your consideration.