Evernote: Using Extended Search Syntax
When performing searches in Evernote, you are able to include special syntax which enables you to focus your search terms.
At the time of writing, this information required to do this isn’t easy to find (the only place I could find it was in the API documentation), so I thought I’d write up a post which explains how to use the Advanced Search Syntax.
This information isn’t as useful for certain implementations of Evernote (eg. iPhone), as an interface is provided to set the appropriate options. However, such an interface doesn’t currently exist for the Windows client. What’s more, some people (myself included) would rather type than click.
Searching solely by Tag
I’ve found ‘searching by tag’ to be the most useful of these, and it was this requirement that inspired me to find out how to perform advance searches in the Windows app.
The syntax to search by tag is:
This will return all notes tagged ‘evernote’:
This will return all notes tagged ‘advanced search syntax’ (notice that its quoted – this is to combine the three separate words):
tag:"advanced search syntax"
This will return all notes tagged ‘advanced search syntax’ and contain the word ‘notebook’:
tag:"advanced search syntax" notebook
Searching by Exclusion of Tags
As well as searching for notes that only contain certain tags, you can also search based on the tags not included by prefixing the minus sign to ‘tag’ (ie. ‘-tag’).
The following will return all notes that don’t contain the tag ‘read’:
You can also use wildcards (ie. *). The following will return all notes that have no tags:
Searching with the Wildcard Character
As the previous example showed, you are able to search with the wildcard character (ie. *). However, its worth noting that the wildcard character can only be used at the end of a word. Not at the start or in the middle..
So… this is legal and would potentially find “google reader” if such a tag existed:
However, the following two are illegal:
Searching by Notebook
If you only wish to search a certain Notebook, you can use ‘notebook’.
The same can be achieved by simply selecting the notebook from the GUI and then performing a search.
The following will search the ‘knowledge base’ notebook for all notes tagged ‘evernote’:
notebook:"knowledge base" tag:evernote
Note: the notebook parameter must precede other parameters. For instance, the following is illegal as ‘tag’ comes before ‘notebook’:
tag:evernote notebook:”knowledge base”
Searching only the Title
To only search the title, use the ‘intitle’ parameter.
intitle:"Evernote: Extended Search Syntax"
Searching for ‘any’ of the Words (not all)
If you want to find one of any of the search terms provided, use the ‘any’ parameter.
The following will search notes for either grep, egrep and fgrep:
any: grep egrep fgrep
The following will search notes with a tag of unix for either grep, egrep and fgrep:
tag:"unix" any: grep egrep fgrep
Note: the ‘any’ parameter must be after other parameters but before the search terms.
Searching by Creation Date
To search by the creation date, use the ‘created’ parameter. The examples below highlight the different ways you can specify the actual date.
To specify the actual date (based on the client’s timezone), the following will search for notes created on 5th of August, 2009:
To find all notes prior to the 5th of August, 2009 use the ‘-‘ symbol:
Finding all notes created before today:
To match all notes that were created yesterday:
To match all notes created in the past 60 days and today:
To match all notes created this week (Sunday through to Saturday):
And similar for finding all notes created this month:
And finally, this year:
Searching by Updated Date
You can also search for notes based on when they were last updated. Simply take the examples for ‘created’ and replace ‘created’ with ‘updated’.
Finding notes generated via Twitter
To find all notes added via Twitter, include the following search term:
The API documentation contains a further set of useful exampes and additional detail to what I’ve written here. Its well worth checking the document out, even if you aren’t actually dealing with the API.
7th August, 2009: Added ‘Finding notes generated via Twitter’