Complex Query - Deferred Tasks

answered

#1

How can I make this search work in Dynalist:

-has:date OR
(has:date and -#defer) OR
( has:date #defer until:today )

I’m wanting to be able to defer tasks by writing something like: “#defer 2020-01-01”.

So this search says, “show me items ‘without dates’ or ‘with dates but not #defer’ or ‘with defer dates that have arrived’”


#2

Remove the “and”.

AND is implicit, every space can be understood was AND. With “and” you’re searching for “and” literally.


#3

Hi,

I am having a similar issue regarding the set up of a complex query.
I want to be able to return items that:

  • Have at least one of the tags I specify AND
  • Are not completed AND
  • either do not have a date or if there is a date the date is in the future.

I tried the following:
(#home OR #laptop) -is:completed (until:now OR -has:date)

However I clearly get wrong results, as per the screenshot below:

Is there something I am missing?

Kind regards


#4

Try this instead:

(until:now OR -has:date) #home -is:completed

For some reason, brackets are not acting right if it’s at the very end of the query.


#5

Thanks Erica, but I am still getting an issue:

With (until:now OR -has:date) #home -is:completed I get the item Example #home !(2018-06-30) which has a date and is after now so should not appear.

image

Moreover, my eventual goal is to have a search of the type:
(until:now OR -has:date) (#tag1 OR #tag2 OR #tag3, etc) -is:completed

but then thee is not a single result, even if the following search is retrieving items!
(until:now OR -has:date) #tag1 -is:completed

Kind regards


#6

Thanks for the reply, @Hicham_Tahiri, I see your problem. Let me ask our engineer.

@Shida: does our search system work with brackets at all? It might be caused by the brackets. Not sure if the brackets are working here. Things might not be grouped properly.


#7

Yeah, so the current search filters doesn’t allow arbitrary AND/OR nesting, and parenthesis doesn’t work.

The way the search parsing currently works is

  1. The entire term is split by “OR” conditions
  2. Each part is split by the space character, and the AND operator is implicitly applied to them

So for example, “#work #due OR until:now” is parsed as:

  • [#work #due] OR [until:now]
  • [(#work) AND (#due)] OR [until:now]

But yeah, the OR operator currently only works on the outer-most level and cannot be nested.


#8

Hi Shida,

Thank you for your quick answer. I am sorry if I do not realise the complexity of the issue, but would it be complicated to fix?

Kind regards


#9

As of right now, we don’t have plans to make changes to the current system. It would be more complicated than a ‘fix’. For example, some people like to use parenthesis for tags, such as #work(urgent), so we can’t just simply recognize them as a grouping term instead of actually being part of the search query.