Search results differ when search terms are reversed

Steps to reproduce

Start with the following list:

  • Apple #type:fruit #color:red
  • Fire Truck #type:vehicle #color:red
  • Banana #type:fruit #color:yellow
  • Wrench #type:tool

I would like to filter down to all items that have color, except for the ones that are red. So I enter the following search:

#color -#color:red

Expected result

I expect the list to filter down to just Banana.

Actual result

No items are shown.

Environment

OS: Windows 10 Insider Beta
Browser: Google Chrome Version 60.0.3112.113 (Official Build) (64-bit)


Additional information

If I invert the order of the search terms, the list filters as expected:

-#color:red #color

  • Banana #type:fruit #color:yellow

Should the order of the search terms be significant? Do I need to put negated search terms before regular ones? If so, is that documented anywhere?

Thanks much,

Craig

This is the β€œintended” behavior, admittedly not at all explained.

At the beginning of Dynalist, tag searches do not match full words. For example, β€œ#cat” will match β€œ#caterpillar”, and some people don’t like this. We thought it’s reasonable, so we changed the search to full word match, i.e. β€œ#cat” will not match β€œ#caterpillar”. But there are still many valid cases where you need partial search, just like your case, when you want to match β€œ#color:red” by searching β€œ#color”.

The solution we came up with is to treat every tag as full word search, except for the last one. That means, if you search for β€œ#cat #dog”, it will not match β€œ#caterpillar #dog”, but it will match β€œ#cat #dogma”, because β€œ#dog” is the last query and will match partial matches. Thus reversing search terms help you find banana in this case…

@Erica, thanks for explaining how this works. It’s different than what I expected, but I think I can make it work.

I suggest you add a note about this behavior to the search help page – it would be really helpful to users like me.

Thanks for your hard work on Dynalist!

3 Likes