Under some conditions the Exclude search function does not work

Steps to reproduce

  1. Create the below list
  • ProjectKeyword
  • ProjectKeyword ExcludeMe
    • ProjectKeyword
  1. Run this search: ProjectKeyword -ExcludeMe

Expected result

I expect the excluded word to actually be excluded from the search.

Search Result:

  • ProjectKeyword

Actual result

The excluded results are appearing in the search results.

Search Result:

  • ProjectKeyword
  • ProjectKeyword ExcludeMe
    • ProjectKeyword

Environment

Which operating system are you using? Windows 10
Which browser are you using? Chrome
If you’re using a desktop or mobile app, what’s the version number of Dynalist? N/A


Additional information

I suspect that the exclude is failing because the keyword is present in the child of an item that would otherwise be excluded. If that’s the case then the ‘exclude’ function isn’t really an ‘exclude function’ it’s an ‘exclude when child doesn’t conflict’ function.

For the quick and dirty fix I think the documentation should updated with that caveat. For a real fix, I think that maybe some kind of hard exclude function should be implemented. Maybe using two dashes instead of one or maybe by making the ordering matter.

Search: ProjectKeyword --ExcludeMe
Search result:

  • ProjectKeyword

Search: -ExcludeMe ProjectKeyword
Search result:

  • ProjectKeyword

Additional comments

As it stands, the exclude function doesn’t really do what it says it does and for high level / parent level filtering it’s effectively useless. The below structure is fairly common in project workflows and it’s broken with the current functionality.

  • Project A
  • Project 1 #NotActive
    • Literally any child at all
  • Project Top

Search: -#NotActive
Search Results:

  • Project A
  • Project 1 #NotActive
    • Literally any child at all
  • Project Top

I’ve seen this same behavior when I tried to a tag like “#noprint” to hide parts of the doc I didn’t want to display when printing. If the tagged item had any children they’d show up anyway.

There’s a great discussion over on another thread about being able to search for (or exclude) nodes whose ancestors have a certain tag. If that were implemented it could be applied to this use case too.

I agree.

In my opinion the current behavior is technically correct (children get matched, parent gets displayed because Dynalist is an outliner and hierarchy is important), but practically not helpful.

A related feature request is the flat search view: Flat Dynalist view

The pro is that it’s easier to implement, and not as complicated as the “search in ancestor” concept (I’m concerned it’ll confuse some users), but the con is that there’s the side effect of hiding the parent chain, which might not be desirable.

1 Like