Jump to content

(Archived) Compound Search Expressions


Recommended Posts

I am hoping that Evernote will soon support "compound search expressions". The advanced search features that are there are very helpful, but without...

  • parenthesis
  • an and operator
  • an or operator
  • a not operator

...I am having trouble making use of tags the way I was hoping to.

Is anybody else crossing their fingers hoping for this feature?

Link to comment
  • Level 5*

Hi. Welcome to the forums! Evernote has great search capabilities now, but it would be even better if Evernote offered some of the options you suggested. I am not sure if/when that will happen, though. Fortunately, you are on a Mac, so you already have access to more powerful searches :)

http://www.princeton.edu/~cmayo/evernote-spotlight-search.html

Link to comment
  • Level 5

I am hoping that Evernote will soon support "compound search expressions". The advanced search features that are there are very helpful, but without...

  • parenthesis
  • an and operator
  • an or operator
  • a not operator

...I am having trouble making use of tags the way I was hoping to.

Is anybody else crossing their fingers hoping for this feature?

In Windows,, I'll give some examples of how I use Evernote to search those subjects.

tag:Obama-Barack

tag:White-House

and operator search:

tag:Obama-Barack tag:White-House

finds all notes with Obama tag and White House tag

or operator search:

any: tag:Obama-Barack tag:White-House

finds either notes with Obama tag or notes with White House tag

not operator search:

tag:Obama-Barack -tag:White-House

finds all notes with Obama tag but not White House tag
Link to comment

I am hoping that Evernote will soon support "compound search expressions". The advanced search features that are there are very helpful, but without...

  • parenthesis
  • an and operator
  • an or operator
  • a not operator

...I am having trouble making use of tags the way I was hoping to.

Is anybody else crossing their fingers hoping for this feature?

In Windows,, I'll give some examples of how I use Evernote to search those subjects.

tag:Obama-Barack

tag:White-House

and operator search:

tag:Obama-Barack tag:White-House

finds all notes with Obama tag and White House tag

or operator search:

any: tag:Obama-Barack tag:White-House

finds either notes with Obama tag or notes with White House tag

not operator search:

tag:Obama-Barack -tag:White-House

finds all notes with Obama tag but not White House tag

The only problem is that "You cannot, in general, mix AND/OR searches. If you use the "any:" search modifier, then you get an OR search, otherwise, you get an AND search."

Link to comment

Yeah, not being able to mix and and or operators is the problem that I have.

I want to be able to say something like...

(tag:recipe and -tag:cooked) and (tag:lamb or tag:beef)

...which would pick out the recipes that I haven't cooked that use either lamb or beef.

This is not my real example, but I hope it demonstrates the problem.

Link to comment

Yeah, not being able to mix and and or operators is the problem that I have.

I want to be able to say something like...

(tag:recipe and -tag:cooked) and (tag:lamb or tag:beef)

...which would pick out the recipes that I haven't cooked that use either lamb or beef.

This is not my real example, but I hope it demonstrates the problem.

Yeah, in your example you'll have to do either:

2 separate searches, i.e.

1) tag:recipe -tag:cooked tag:lamb

2)tag:recipe -tag:cooked tag:beef

Or combine tags such as lamb, beef

1) by moving them (their notes) to a temporary Notebook or Tag, name it "temp" for example. And then search for tag:recipe -tag:cooked tag:temp

2) adding a prefix to those tags, i.e. meat-lamb, meat-beef. And then search for tag:recipe -tag:cooked tag:"meat*"

All workarounds are very inconvenient though because it takes a lot of time and you can't do such search right away which in most cases leads to just avoiding doing such searches altogether unless you **really** have to.

Link to comment
  • Level 5*

Or, use Spotlight. I am pretty sure that you could accomplish all of that (I just tested it with my account, and it seemed to pull up the expected results).

It helps, of course, if you use unique tags. For example, I tag news stories in Japanese with jp-news (unlikely to come up in the body of any note) and news stories in Chinese with ch-news (again, unlikely to come up in the body of any note). This is based on jbenson's method of tagging (http://www.princeton.edu/~cmayo/evernote-tag.html).

Link to comment

Yeah, spotlight is the best solution as long as you're on a mac and you're using unique Tags(not just common words). In my case that's rarely the case though because I'm using evernote on iPad/iPhone almost exclusively.

Using Evernote on a desktop/laptop now feels to me like driving a truck to buy groceries somewhere nearby instead of just taking a short walk. :)

Link to comment
  • Level 5*

Yeah, spotlight is the best solution as long as you're on a mac. In my case that's rarely the case though because I'm using evernote on iPad/iPhone almost exclusively.

Using Evernote on a desktop/laptop now feels to me like driving a truck to buy groceries somewhere nearby instead of just taking a short walk. :)

I agree. One thing I like about the iPad is that it doesn't do instant search, so I can take the time to type out the advanced search I want without beachballing my computer. I miss Spotlight, though, for some of the more targeted searches. In general, though, I try to set up my index notes (full of note links to notes on a topic) and so forth ahead of time so that when I am out and about I don't need Spotlight anyhow -- I've already got the results of the search right there. Of course, this only works for frequent queries or queries I can predict I will make.

Link to comment

For my purposes I think the separate searches will be the way to go. I'm trying to organise receipts for a tax return. They are tagged with their year and month. In Australia a financial year runs from July to June, so my search would look something like...

"FY12 Search" = tag:receipt and ((tag:2011 and (tag:jul or tag:aug or tag:sep or tag:oct or tag:nov or tag:dec)) or (tag:2012 and (tag:jan or tag:feb or tag:mar or tag:apr or tag:may or tag:jun)))

...but based on the feedback from all of you I think i'll set up two searches like so...

"FY12 Search Part 1" = tag:receipt and (tag:2011 and (tag:jul or tag:aug or tag:sep or tag:oct or tag:nov or tag:dec))

"FY12 Search Part 2" = tag:receipt and (tag:2012 and (tag:jan or tag:feb or tag:mar or tag:apr or tag:may or tag:jun))

Not quite as cool as I was imagining when I painstakingly tagged all of my receipts with year and month tags, but better than paper receipts in a shoebox!

If anyone else has a need for the kind of advanced search syntax that i'm hoping for, please add your scenario to this thread.

Thankyou all again for your guidance.

Link to comment
  • Level 5*

@jdownie: Evernote does not natively support mixed arbitrary AND/OR searches at this time, and for them to do so, they would need to change their search grammar, which is used in their cloud services as well as in the various clients. This would be a significant undertaking for them, and they'd need to coordinate across platforms, something they don't often do. I wouldn't expect it any time soon, no matter how useful it would be (I think that it would be very useful, myself).

That being said, it looks as though you are doing mixed tag and date searches, even though you've encoded your date information using tags. Why not use the Created date to implement your receipt dates, and then use the date search facilities to give you the searches that you want?

Edit: think I misspoke myself: I'm not actually sure that you can do this, but I'll spelunk a bit to find out for sure, either way.

Link to comment
  • 2 months later...

I am using evernote to do GTD using "The Secret Weapon" like method, primarily for TODOs. So, I have tags for people (who) as well as tags for priority (when). I meet with people for 1:1 meetings and discuss their TODO items. When I meet, I like to see what TODOs I have for them now, next, soon. This search is then: tag:someone AND (tag:1-now OR tag:2-next OR 3-soon), which is of course not supported, but I feel a very valid use-case.

That said, I was playing with some syntax today and found that I can now do the following in the latest OSX version and save this as a "1:1 with Someone" search:

notebook:Pending tag:someone any:(tag:1-now tag:2-next tag:3-soon)

This now seems to work as I expect and gives me all notes with tags "someone" (who) which have any of the tags "1-now" OR "2-next" OR "3-soon" (when). Perfect for what I wanted, however, it does NOT seem to work on the latest iphone version of evernote, sigh.

This working for anyone else? Anyone know if this is a new syntax that is being tested?

Actually, now that I think of it, when I typed it into the search bar and hit save, it originally saved it wrong, like this:

notebook:Pending any:(tag:1-now tag:someone tag:2-next tag:3-soon)

(Note the tag:someone in the wrong place)

But, then I edited the saved search to the correct:

notebook:Pending tag:someone any:(tag:1-now tag:2-next tag:3-soon)

And it works fine. This is OSX Version 3.3.1 (300245).

Link to comment
  • Level 5

The suggestion was - some previous time this was raised - that users would find full boolean logic to be bewildering. I dissent from this view at two levels;

  • You don't have to use it.
  • Boolean logic is not that hard.

But then, as I said at the time, Augustus De Morgan founded my maths department... :-)

Link to comment
  • Level 5*

I am pretty sure that such a thing can be done, by breaking down the main expression into sub-expressions, and tagging intermediate results uniquely, then using tag searches to re-combine. You'd probably need to define a separate language that allows parenthesized search expressions, probably disregarding "any":", etc. You'd probably want to deal with NOT searches as well.

For example: let T1, T2 and T3 be defined such that T1 is a search for tag "Todo" (tag:Todo), T2 is a search for uncompleted todos (todo:false) and T3 is a search for notes created in the last week (created:day-7)

  • Perform a standard Evernote search: any: tag:Todo todo:false. Tag the results with a temporary tag, say "Temp1"
  • Now perform the standard Evernote search: tag:Temp1 created:day-7. This should be the result that you want.

This should be extendable to arbitrary Boolean expressions. NOT handling might be tricky, but one thing that you might be able to do is to handle the multiple notebook search issue. For example, if the tool saw a sub-expression like (notebook:N1 OR notebook:N2), if could perhaps be bright enough to turn those into tag searches, by tagging all of the notes in notebook N1 uniquely, and all of the notes in notebook N2 uniquely, and then doing a tag search.

This kind of procedure is something that you can do by hand, but in general, that'd be a pain.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...