Jump to content

Complex boolean search: is it possible to use both keywords tag and any?


Go to solution Solved by Pavel Sapehin,

Recommended Posts

Currently I am trying to find a notes which contain a specific tag along with multiple tags. For example, I want to find all my to do's for the University:

tag:university any: tag:to_do_1 tag: to_do_2 tag:to_do_3

But it doesn't work. Is it possible to combine tag and any in terms of AND logical operator?

Link to comment
  • Level 5*
On 2016-11-22 at 12:31 AM, Pavel Sapehin said:

Is it possible to combine tag and any in terms of AND logical operator?

No, it's not possible to combine and/or searches.  Full search documentation is here Evernote Search Grammar

My approach would be to do the search in two steps

  1. Do the Any search, and assign a temporary tag
  2. Do the And search using tag:university tag:temporary

 

 

  • Like 4
Link to comment
  • 3 weeks later...
  • Solution

Actually, I have found a working solution thankfully to the attached topic. Yep, it is partially possible.

The main idea is to make tags "to_do_1", "to_do_2", etc. a direct children of the tag "to_do". Then I can do the following search:

tag:university tag:to_do*

Note: asterisk includes all children tags into the query.

 

  • Like 1
Link to comment
  • Level 5*
2 hours ago, Pavel Sapehin said:

Actually, I have found a working solution thankfully to the attached topic. Yep, it is partially possible.

The main idea is to make tags "to_do_1", "to_do_2", etc. a direct children of the tag "to_do". Then I can do the following search:


tag:university tag:to_do*

Note: asterisk includes all children tags into the query.

Right, that is the only way I've found as well (I was answering the general question and didn't notice that you were using a common prefix). I and others had discovered this before, awhile back. It's kinda cool, but it's a special case and I never found it to be generally useful, since it depends on a tag naming scheme that has a common prefix, which I don't use. But it's a nice-to-have, as in your case.

I've long thought a change to the Evernote search language to handle this would be nice, but Evernote seems reluctant to change the language, at least very often, as it affects all Evernote clients, as well as any integration services, and the server software as well.

Link to comment
  • 1 year later...
  • Level 5*
8 hours ago, Synapsehead said:

If you nest tags and use the tag search box <shift+alt+t> and choose a parent tag, it will include the children tags in the search.  This is not the case if you use the tag: syntax in the search box.

You are referring to the Windows platform option that includes child tags In a search.  I've also accomplished this using a script on my Mac

Wildcards in the searchbox will work on any platform if there's a common name prefix; it does not reference the parent/child relationship

Another reason for using name prefix is the hierarchy isn't always shown.  For example, I don't see tag hierarchy on my iPad.

Link to comment
  • Level 5*
8 hours ago, Synapsehead said:

If you nest tags and use the tag search box <shift+alt+t> and choose a parent tag, it will include the children tags in the search.  This is not the case if you use the tag: syntax in the search box.

As DTLow says, this is Windows-only, and only then if you have the Tools / Options / Navigation / "Automatically include child tags" enabled. In practice, I've found this limiting, as it's a global setting, and there's times I want this option, and times I don't. It'd be nice to have a search language update that allows you to make ad hoc queries that use the feature. But oso far that's not forthcoming. I keep the option disabled.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...