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